-
Notifications
You must be signed in to change notification settings - Fork 189
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
Hangups crashes on windows. NameError: name 'fcntl' is not defined #186
Comments
Running hangups on Windows requires Cygwin. |
Not sure what the problem is then. I've had reports that it works on Windows, but I haven't tried it myself. |
Seeing same error on my Windows 7 box. edit: Just tested on a Windows 10 box. Same error. |
Just installed on Windows 7 with Cygwin, same issue. I tried uninstalling and reinstalling urwid and installing hangups from source, but still the same errors. It's weird because if I start python and type in "import fcntl; fcntl.fcntl" it does exist - possibly an issue with multiple installations of python (I have 2.7 and 3.5 on normal Windows and Cygwin uses 3.4, but it seems to be running scripts located in 3.5 anyways). Any ideas? (I don't care too much about the client, I just want to use the API, but so far I haven't found an easy way to find conversation ids without running the client at least once.) |
fcntl is a Unix only module, which provides an interface to the ioctl and fcntl functions on Unix. Within Windows OS, win32 api will provide all these I/O interfaces. And for hangups, it's using urwid for hangups ui. So for windows os, there is a workaround: install Cygwin first, then install Python, hangups inside Cygwin shell. Hope it helps. |
@tdryer I have been planning on opening a PR upstream for urwid (as this is the lib where the error stems from) to include a fix for Windows machines. If my changes are merged will you update the project accordingly? More specifically, basically making mention of the situation in your docs explaining how this is essentially yet another difference in how Windows v Linux (userspace api) |
I'd be happy to advertise Windows support if someone can test it to confirm that it works with an updated urwid. |
$ hangups
←]2;hangups
Traceback (most recent call last):
File "c:\Users\Ryan\AppData\Local\Programs\Python\Python35\Scripts\hangups-scr
ipt.py", line 9, in
load_entry_point('hangups==0.3.2', 'console_scripts', 'hangups')()
File "c:\users\ryan\appdata\local\programs\python\python35\lib\site-packages\h
angups\ui__main__.py", line 966, in main
datetimefmt, args.disable_notifications
File "c:\users\ryan\appdata\local\programs\python\python35\lib\site-packages\h
angups\ui__main__.py", line 79, in init
event_loop=urwid.AsyncioEventLoop(loop=loop)
File "c:\users\ryan\appdata\local\programs\python\python35\lib\site-packages\u
rwid\main_loop.py", line 111, in init
screen = raw_display.Screen()
File "c:\users\ryan\appdata\local\programs\python\python35\lib\site-packages\u
rwid\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
The text was updated successfully, but these errors were encountered: