npyscreen icon indicating copy to clipboard operation
npyscreen copied to clipboard

ExampleOptionList.py does not run

Open oliveratutexas opened this issue 9 years ago • 5 comments

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

oliveratutexas avatar Jun 29 '15 03:06 oliveratutexas

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.

npcole avatar Jun 29 '15 09:06 npcole

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.

npcole avatar Jun 29 '15 10:06 npcole

I see this issue is from 2015, you still haven't fixed it. Is this project dead??

gaining avatar Jun 19 '17 04:06 gaining

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

gaining avatar Jun 19 '17 04:06 gaining

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 .

npcole avatar Jun 19 '17 16:06 npcole