How to work with Python 3.8?
Closed this issue · 1 comments
Hi @manipuladordedados ,
I was looking for some open source projects to contribute, and came across this while browsing on Code Triage.
I want to contribute but I guess it's been 2 years since the last activity.
I tried running pdiary
and came across errors. I guess some of the dependency packages are not maintained up to Python 3.8.
Here is the error I get:
$ pdiary
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/npyscreen/apNPSApplicationEvents.py", line 16, in get
yield self.interal_queue.pop()
IndexError: pop from an empty deque
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/npyscreen/apNPSApplicationEvents.py", line 18, in get
raise StopIteration
StopIteration
I went to npyscreen/apNPSApplicationEvents.py
and changed line 18 from raise StopIteration
to return
.
Then I am able to run pdiary
a bit. I get the password prompt. Type my password twice, hit Enter. Then it crashes again with the following error:
pdiary
Traceback (most recent call last):
File "/usr/local/bin/pdiary", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.8/dist-packages/pdiary/main.py", line 37, in main
MyApp.run()
File "/usr/local/lib/python3.8/dist-packages/npyscreen/apNPSApplication.py", line 30, in run
return npyssafewrapper.wrapper(self.__remove_argument_call_main)
File "/usr/local/lib/python3.8/dist-packages/npyscreen/npyssafewrapper.py", line 41, in wrapper
wrapper_no_fork(call_function)
File "/usr/local/lib/python3.8/dist-packages/npyscreen/npyssafewrapper.py", line 97, in wrapper_no_fork
return_code = call_function(_SCREEN)
File "/usr/local/lib/python3.8/dist-packages/npyscreen/apNPSApplication.py", line 25, in __remove_argument_call_main
return self.main()
File "/usr/local/lib/python3.8/dist-packages/npyscreen/apNPSApplicationManaged.py", line 172, in main
self._THISFORM.edit()
File "/usr/local/lib/python3.8/dist-packages/npyscreen/fm_form_edit_loop.py", line 47, in edit
self.edit_loop()
File "/usr/local/lib/python3.8/dist-packages/npyscreen/fm_form_edit_loop.py", line 38, in edit_loop
self._widgets__[self.editw].edit()
File "/usr/local/lib/python3.8/dist-packages/npyscreen/wgwidget.py", line 458, in edit
self._edit_loop()
File "/usr/local/lib/python3.8/dist-packages/npyscreen/wgwidget.py", line 474, in _edit_loop
self.get_and_use_key_press()
File "/usr/local/lib/python3.8/dist-packages/npyscreen/wgwidget.py", line 610, in get_and_use_key_press
self.handle_input(ch)
File "/usr/local/lib/python3.8/dist-packages/npyscreen/wgwidget.py", line 71, in handle_input
self.handlers[_input](_input)
File "/usr/local/lib/python3.8/dist-packages/npyscreen/wgbutton.py", line 99, in h_toggle
self.whenPressed()
File "/usr/local/lib/python3.8/dist-packages/npyscreen/fmActionFormV2.py", line 10, in whenPressed
return self.parent._on_ok()
File "/usr/local/lib/python3.8/dist-packages/npyscreen/fmActionFormV2.py", line 51, in _on_ok
self.editing = self.on_ok()
File "/usr/local/lib/python3.8/dist-packages/pdiary/forms.py", line 236, in on_ok
db = database.dbManager(self.passbox.value)
File "/usr/local/lib/python3.8/dist-packages/pdiary/lib/database.py", line 43, in __init__
db.create_tables([Entry])
File "/usr/local/lib/python3.8/dist-packages/peewee.py", line 3286, in create_tables
model.create_table(**options)
File "/usr/local/lib/python3.8/dist-packages/peewee.py", line 6595, in create_table
cls._schema.create_all(safe, **options)
File "/usr/local/lib/python3.8/dist-packages/peewee.py", line 5731, in create_all
self.create_table(safe, **table_options)
File "/usr/local/lib/python3.8/dist-packages/peewee.py", line 5586, in create_table
self.database.execute(self._create_table(safe=safe, **options))
File "/usr/local/lib/python3.8/dist-packages/peewee.py", line 3112, in execute
return self.execute_sql(sql, params, commit=commit)
File "/usr/local/lib/python3.8/dist-packages/peewee.py", line 3097, in execute_sql
cursor = self.cursor(commit)
File "/usr/local/lib/python3.8/dist-packages/peewee.py", line 3081, in cursor
self.connect()
File "/usr/local/lib/python3.8/dist-packages/peewee.py", line 3035, in connect
self._state.set_connection(self._connect())
File "/usr/local/lib/python3.8/dist-packages/playhouse/sqlcipher_ext.py", line 71, in _connect
conn = sqlcipher.connect(self.database, isolation_level=None, **params)
TypeError: 'kdf_iter' is an invalid keyword argument for this function
Any idea how I can progress? Or should I just abandon the idea of working on this? What other up to date packages can be used instead?
Fixed.