View Single Post
Old 02-27-2019, 08:35 AM   #36
Frenzie
Wizard
Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.
 
Posts: 1,619
Karma: 724945
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
Yes, it now runs fine out of the box, albeit still only in Python 2.7.

Python 3 looks like this:

Code:
Traceback (most recent call last):
  File "main.py", line 29, in <module>
    from gui_main import Ui_Base  # ___ ______ GUI STUFF ________________
  File "/home/frans/src/kobo/KoHighlights-master/gui_main.py", line 265, in <module>
    from main import DropTableWidget
  File "/home/frans/src/kobo/KoHighlights-master/main.py", line 30, in <module>
    from gui_about import Ui_About
  File "/home/frans/src/kobo/KoHighlights-master/gui_about.py", line 106, in <module>
    import images_rc
  File "/home/frans/src/kobo/KoHighlights-master/images_rc.py", line 21, in <module>
    qInitResources()
  File "/home/frans/src/kobo/KoHighlights-master/images_rc.py", line 16, in qInitResources
    QtCore.qRegisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data)
TypeError: 'qRegisterResourceData' called with wrong argument types:
  qRegisterResourceData(int, str, str, str)
Supported signatures:
  qRegisterResourceData(int, unicode, unicode, unicode)
On my desktop I got this error when scanning, perhaps because Python 2.7 is a bit weird about Unicode. However, I tracked it to a problematic file on my system called:

Code:
'Hy'$'\366''kk'$'\344''yksen Tiedot.doc'
It's not clear to me why it's problematic, because it sounds like it should just result in ẙ and, um, this one. It's actually supposed to read HYÖKKÄYKSEN. This is how wget saved it in a website mirroring command. Anyway, it doesn't seem like much you could do anything about. Python 3 *might* run into less of a problem. I haven't tried it.

Code:
Traceback (most recent call last):
  File "main.py", line 1925, in process
    self.start_scan()
  File "main.py", line 1929, in start_scan
    for dir_tuple in os.walk(self.path):
  File "/usr/lib/python2.7/os.py", line 296, in walk
    for x in walk(new_path, topdown, onerror, followlinks):
  File "/usr/lib/python2.7/os.py", line 296, in walk
    for x in walk(new_path, topdown, onerror, followlinks):
  File "/usr/lib/python2.7/os.py", line 296, in walk
    for x in walk(new_path, topdown, onerror, followlinks):
  File "/usr/lib/python2.7/os.py", line 296, in walk
    for x in walk(new_path, topdown, onerror, followlinks):
  File "/usr/lib/python2.7/os.py", line 296, in walk
    for x in walk(new_path, topdown, onerror, followlinks):
  File "/usr/lib/python2.7/os.py", line 296, in walk
    for x in walk(new_path, topdown, onerror, followlinks):
  File "/usr/lib/python2.7/os.py", line 286, in walk
    if isdir(join(top, name)):
  File "/usr/lib/python2.7/posixpath.py", line 73, in join
    path += '/' + b
UnicodeDecodeError: 'ascii' codec can't decode byte 0xf6 in position 3: ordinal not in range(128)
As an aside, this line is Windows-only:
Code:
elif dir_path.lower().endswith("koreader\\history")

Last edited by Frenzie; 02-27-2019 at 08:38 AM.
Frenzie is offline   Reply With Quote