Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Just installed asciimatics and i get error on all the examples i try. #41

Closed
xzenon12 opened this issue Aug 21, 2016 · 3 comments
Closed
Assignees
Labels

Comments

@xzenon12
Copy link

Just installed asciimatics on windows 10 and i get error on all the examples i try.
I did pip install asciimatics and Everything Went fine but when i tried the examples out i get lots of errors i dont know if i am missing something.

the error i get is. its almost the same in all the examples.

Traceback (most recent call last):
  File "C:\Users\xzenon\Desktop\asciimatics-master\asciimatics-master\samples\pacman.py", line 532, in <module>
    Screen.wrapper(demo)
  File "C:\Users\xzenon\AppData\Local\Programs\Python\Python35-32\lib\site-packages\asciimatics-1.6.0-py3.5.egg\asciimatics\screen.py", line 988, in wrapper
    unicode_aware=unicode_aware)
  File "C:\Users\xzenon\AppData\Local\Programs\Python\Python35-32\lib\site-packages\asciimatics-1.6.0-py3.5.egg\asciimatics\screen.py", line 897, in open
    None))
pywintypes.error: (6, 'CreateFile', 'Referensen (handle) är felaktig.')
@peterbrittain peterbrittain self-assigned this Aug 21, 2016
@peterbrittain
Copy link
Owner

peterbrittain commented Aug 21, 2016

From the line numbers, you are running the latest development version of the code... That error indicates that Windows thinks there is an invalid handle, but you should be using a process with an active console and so the following applies...

The CreateFile function can create a handle to console input (CONIN$). If the process has an open handle to it as a result of inheritance or duplication, it can also create a handle to the active screen buffer (CONOUT$). The calling process must be attached to an inherited console or one allocated by the AllocConsole function. For console handles, set the CreateFile parameters as follows.

Are you running inside a command prompt, or from some other program - e.g. an IDE or editor?

@xzenon12
Copy link
Author

xzenon12 commented Aug 22, 2016

The errors appers in the python ide it seems to work fine in the command prompt.

@peterbrittain
Copy link
Owner

Well, that's expected then. Most IDEs don't actually provide a real console session.

I've just updated the troubleshooting guide to cover more than PyCharm and so believe this issue is closed. Please shout if you think there's more required here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants