npyscreen
npyscreen copied to clipboard
ExampleOptionList.py does not run
I downloaded npyscreen and tried to run this file but I get an error. I rand several other examples, but this is the only one that seems to give me problems:
Traceback (most recent call last):
File "EXAMPLE-OptionList.py", line 43, in
File "filepath/npyscreen-4.9.1/npyscreen/apNPSApplication.py", line 30, in run
return npyssafewrapper.wrapper(self.__remove_argument_call_main)
File "filepath/npyscreen-4.9.1/npyscreen/npyssafewrapper.py", line 41, in wrapper
wrapper_no_fork(call_function)
File "filepath/npyscreen-4.9.1/npyscreen/npyssafewrapper.py", line 97, in wrapper_no_fork
return_code = call_function(_SCREEN)
File "filepath/npyscreen-4.9.1/npyscreen/apNPSApplication.py", line 25, in __remove_argument_call_main
return self.main()
File "EXAMPLE-OptionList.py", line 27, in main
except FileNotFoundError:
NameError: global name 'FileNotFoundError' is not defined
Thanks. I'll have a look later.
On Monday, 29 June 2015, Oliver Croomes [email protected] wrote:
I downloaded npyscreen and tried to run this file but I get an error. I rand several other examples, but this is the only one that seems to give me problems:
Traceback (most recent call last): File "EXAMPLE-OptionList.py", line 43, in App.run()
File "filepath/npyscreen-4.9.1/npyscreen/apNPSApplication.py", line 30, in run return npyssafewrapper.wrapper(self.__remove_argument_call_main) File "filepath/npyscreen-4.9.1/npyscreen/npyssafewrapper.py", line 41, in wrapper wrapper_no_fork(call_function) File "filepath/npyscreen-4.9.1/npyscreen/npyssafewrapper.py", line 97, in wrapper_no_fork return_code = call_function(_SCREEN)
File "filepath/npyscreen-4.9.1/npyscreen/apNPSApplication.py", line 25, in __remove_argument_call_main return self.main() File "EXAMPLE-OptionList.py", line 27, in main except FileNotFoundError: NameError: global name 'FileNotFoundError' is not defined
— Reply to this email directly or view it on GitHub https://github.com/npcole/npyscreen/issues/28.
Looks like I've used a Python3 only exception. Should be IOError on Python2. I'll fix when I'm back at my desk later.
On Monday, 29 June 2015, Nicholas Cole [email protected] wrote:
Thanks. I'll have a look later.
On Monday, 29 June 2015, Oliver Croomes <[email protected] javascript:_e(%7B%7D,'cvml','[email protected]');> wrote:
I downloaded npyscreen and tried to run this file but I get an error. I rand several other examples, but this is the only one that seems to give me problems:
Traceback (most recent call last): File "EXAMPLE-OptionList.py", line 43, in App.run()
File "filepath/npyscreen-4.9.1/npyscreen/apNPSApplication.py", line 30, in run return npyssafewrapper.wrapper(self.__remove_argument_call_main) File "filepath/npyscreen-4.9.1/npyscreen/npyssafewrapper.py", line 41, in wrapper wrapper_no_fork(call_function) File "filepath/npyscreen-4.9.1/npyscreen/npyssafewrapper.py", line 97, in wrapper_no_fork return_code = call_function(_SCREEN)
File "filepath/npyscreen-4.9.1/npyscreen/apNPSApplication.py", line 25, in __remove_argument_call_main return self.main() File "EXAMPLE-OptionList.py", line 27, in main except FileNotFoundError: NameError: global name 'FileNotFoundError' is not defined
— Reply to this email directly or view it on GitHub https://github.com/npcole/npyscreen/issues/28.
I see this issue is from 2015, you still haven't fixed it. Is this project dead??
These lines were the culprit of your broken code. I removed them for now and now it works.
try:
Options.reload_from_file('/tmp/test')
except IOError:
pass
It's not dead. It's just been sleeping a bit. There are quite a few issues to push out in a fix, and I'll try to do that this week.
On Mon, Jun 19, 2017 at 5:21 AM, gaining [email protected] wrote:
These lines were the culprit of your broken code. I removed them for now and now it works.
try: Options.reload_from_file('/tmp/test') except IOError: pass
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/npcole/npyscreen/issues/28#issuecomment-309335302, or mute the thread https://github.com/notifications/unsubscribe-auth/AB9ezxk713Lt6i6i0ZAtgXRPuAX6ryifks5sFfdngaJpZM4FN0iU .