npcole / npyscreen

Automatically exported from code.google.com/p/npyscreen
Other
481 stars 109 forks source link

ExampleOptionList.py does not run #28

Open oliveratutexas opened 9 years ago

oliveratutexas commented 9 years ago

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

npcole commented 9 years ago

Thanks. I'll have a look later.

On Monday, 29 June 2015, Oliver Croomes notifications@github.com 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 commented 9 years ago

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 nicholas.cole@gmail.com wrote:

Thanks. I'll have a look later.

On Monday, 29 June 2015, Oliver Croomes <notifications@github.com javascript:_e(%7B%7D,'cvml','notifications@github.com');> 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.

gaining commented 7 years ago

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

gaining commented 7 years ago

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
npcole commented 7 years ago

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 notifications@github.com 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 .