Giter VIP home page Giter VIP logo

Comments (5)

MiguelGall avatar MiguelGall commented on September 25, 2024

I have the same problem, people told me sqlite problems, use another database

from monocle.

almico avatar almico commented on September 25, 2024

Interesting. Thank you.
I will look for some information about how to migrate from sqlite3 to mysql.

from monocle.

 avatar commented on September 25, 2024

It is caused by incorrect use of database API objects in notification.py. My notification system rewrite (#214) will fix this problem, but if you're in a hurry for a short-term fix, you can apply this patch to your monocle instance:

diff --git a/monocle/notification.py b/monocle/notification.py
index 754ccf4..3a2ba95 100755
--- a/monocle/notification.py
+++ b/monocle/notification.py
@@ -720,8 +720,10 @@ class Notifier:
             seen = pokemon['seen'] % 3600
             cache_handle = self.cache.store.add(pokemon['encounter_id'])
             try:
-                with session_scope() as session:
-                    tth = await run_threaded(estimate_remaining_time, session, pokemon['spawn_id'], seen)
+                def xxx_estimate_remaining_time_with_session():
+                    with session_scope() as session:
+                        return estimate_remaining_time(session, pokemon['spawn_id'], seen)
+                tth = await run_threaded(xxx_estimate_remaining_time_with_session)
             except Exception:
                 self.log.exception('An exception occurred while trying to estimate remaining time.')
                 now_epoch = time()

from monocle.

almico avatar almico commented on September 25, 2024

Thank you @mewio 😃
I took the opportunity to move to MySQL (with some fiddling I managed to port everything), but I think your fix will be much appreciated by a lot of users.

from monocle.

DavePlater avatar DavePlater commented on September 25, 2024

Notifications use their own DB that is different than where sightings are kept?

from monocle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.