flathub / net.ankiweb.Anki

https://flathub.org/apps/details/net.ankiweb.Anki
21 stars 13 forks source link

Syncing works but causes errors #3

Closed Binero closed 6 years ago

Binero commented 6 years ago

Every time I try to Sync with Anki, it generates a popup with the following error:

Syncing failed:
Traceback (most recent call last):
  File "/app/share/anki/aqt/sync.py", line 340, in run
    self._sync()
  File "/app/share/anki/aqt/sync.py", line 407, in _sync
    self._syncMedia()
  File "/app/share/anki/aqt/sync.py", line 441, in _syncMedia
    ret = self.client.sync()
  File "/app/share/anki/anki/sync.py", line 712, in sync
    self.col.media.findChanges()
  File "/app/share/anki/anki/media.py", line 371, in findChanges
    self._logChanges()
  File "/app/share/anki/anki/media.py", line 393, in _logChanges
    (added, removed) = self._changes()
  File "/app/share/anki/anki/media.py", line 415, in _changes
    with os.scandir(self.dir()) as it:
AttributeError: __exit__

The syncing seems to work fine otherwise.

Host system does not show the error. (Arch Linux)

njam commented 6 years ago

Possibly a problem with the flatpak version. Didn't see what repo this is :)

jbhoot commented 6 years ago

This post on Anki Beta forums pinpoints the issue: Python 3.6 is required for the above code to work flawlessly. But the flatpak version refers to Python 3.5.

nedrichards commented 6 years ago

This will probably have to wait until the new Freedesktop 1.8 runtime is available then. I'm not sure when exactly the release date for that is - but it's in testing currently.

dsd commented 6 years ago

@nedrichards I see there's a new freedesktop 18.08 runtime with python-3.7, but this app actually uses the Kde runtime 5.9 (Anki is incompatible with Qt-5.10). Is the Kde-5.9 runtime going to be updated against the new freedesktop base?

nedrichards commented 6 years ago

No. That'll likely happen for the next lts Qt, which I believe is 5.12.

On Thu, 16 Aug 2018, 08:28 Daniel Drake, notifications@github.com wrote:

@nedrichards https://github.com/nedrichards I see there's a new freedesktop 18.08 runtime with python-3.7, but this app actually uses the Kde runtime 5.9 (Anki is incompatible with Qt-5.10). Is the Kde-5.9 runtime going to be updated against the new freedesktop base?

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/flathub/net.ankiweb.Anki/issues/3#issuecomment-413452464, or mute the thread https://github.com/notifications/unsubscribe-auth/AASeVb2yKVNLRStjk4MlafXU02XvtvZFks5uRR8qgaJpZM4TtVTo .

nanonyme commented 6 years ago

This is by the way the tracker ticket for KDE runtime port to Freedesktop runtime 18.08 https://gitlab.com/freedesktop-sdk/freedesktop-sdk/issues/110

dsd commented 6 years ago

Sorry that it took a long time to get to this.

I pushed Anki-2.1.4 plus a patch (for now) to make this code py3.5 compatible. There is no longer any error upon sync.