hootnot / oandapyV20-examples

Examples demonstrating the use of oandapyV20 (oanda-api-v20)
MIT License
147 stars 65 forks source link

Error of oanda_console.py-----NameError: name 'fcntl' is not defined #10

Closed ztt1 closed 7 years ago

ztt1 commented 7 years ago

Hi, After i set my token and accountID to file respectively and installed all packages in requirements.txt followed the steps, i found this error.

Traceback (most recent call last):
  File "oanda_console.py", line 370, in <module>
    event_loop=GeventLoop())
  File "C:\Users\jingjue\AppData\Local\Programs\Python\Python35\lib\site-packages\urwid\main_loop.py", line 111, in __init__
    screen = raw_display.Screen()
  File "C:\Users\jingjue\AppData\Local\Programs\Python\Python35\lib\site-packages\urwid\raw_display.py", line 89, in __init__
    fcntl.fcntl(self._resize_pipe_rd, fcntl.F_SETFL, os.O_NONBLOCK)
NameError: name 'fcntl' is not defined

how can i fix it? Thank you!

hootnot commented 7 years ago

Hi, you use Windows. There are compatibility issues regarding this application. See https://www.google.nl/url?sa=t&source=web&rct=j&url=https://github.com/cs01/gdbgui/issues/18&ved=0ahUKEwi155DvzdjVAhXCK1AKHdw1C3cQFggiMAI&usg=AFQjCNFsV-mCNEGMzsXLpd3PQzFZJpQPUQ . If you want to use this oanda_console.py, you can install Virtualbox and run it in a Linux OS of your choice. Succes.

ztt1 commented 7 years ago

Thank you! i will try it late.

hootnot commented 7 years ago

@ztt1 Hi, I don't know if you already were able to run this application under linux. It only runs on unix environments, so I added that restriction to the README.rst and will close this issue.