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

hangups macOS 10.13.5 / Python 3.7 #419

Open
psonis opened this issue Jul 11, 2018 · 10 comments
Open

hangups macOS 10.13.5 / Python 3.7 #419

psonis opened this issue Jul 11, 2018 · 10 comments

Comments

@psonis
Copy link

psonis commented Jul 11, 2018

I get this error when trying to run it on my Mac:

Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.7/bin/hangups", line 7, in
from hangups.ui.main import main
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/hangups/init.py", line 6, in
from .client import Client
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/hangups/client.py", line 135
self._listen_future = asyncio.async(self._channel.listen())
^
SyntaxError: invalid syntax

Any clues?

@psonis
Copy link
Author

psonis commented Jul 11, 2018

I commented line 135 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/hangups/client.py and it worked...
self._listen_future = asyncio.async(self._channel.listen())

But now I get Login failed (Authorization code cookie not found) when I enter my credentials.
I am using a unique app password because I have 2FA enabled.

@psonis
Copy link
Author

psonis commented Jul 11, 2018

I managed to log in but now I got a number of errors

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/hangups/ui/__main__.py", line 125, in __init__
    loop.run_until_complete(asyncio.gather(*coros))
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/base_events.py", line 568, in run_until_complete
    return future.result()
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/hangups/ui/__main__.py", line 148, in _connect
    yield from self._client.connect()
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/hangups/client.py", line 139, in connect
    yield from self._listen_future
TypeError: 'NoneType' object is not iterable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.7/bin/hangups", line 11, in <module>
    sys.exit(main())
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/hangups/ui/__main__.py", line 1140, in main
    datetimefmt, notifier_, args.discreet_notifications
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/hangups/ui/__main__.py", line 135, in __init__
    loop.run_until_complete(task)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/base_events.py", line 568, in run_until_complete
    return future.result()
concurrent.futures._base.CancelledError

@psonis
Copy link
Author

psonis commented Jul 11, 2018

Probably shouldn't have commented the line in the first place...

@psonis
Copy link
Author

psonis commented Jul 11, 2018

OK reverted to Python 3.6.x
I guess 3.7 isn't fully compatible...

@psonis psonis closed this as completed Jul 11, 2018
@Terrance
Copy link
Contributor

Deleting arbitrary lines likely won't get you very far...

Regarding the original error: async is a reserved keyword as of 3.7, and asyncio.async (deprecated since Python 3.4) was removed as a result -- this and other instances needs updating to use asyncio.ensure_future instead (hangups requires 3.5+ so this shouldn't be an issue).

3.7 hasn't yet landed on Arch so I've yet to test it, not sure if there are any other breaking changes.

@psonis
Copy link
Author

psonis commented Jul 12, 2018

Yes you're right.
I do get occasionally crashes with Python 3.6.6 (v3.6.6:4cf1f54eb7) and macOS 10.13.5.
Here is the traceback:

File "/Library/Frameworks/Python.framework/Versions/3.6/bin/hangups", line 11, in <module>
   load_entry_point('hangups==0.4.4', 'console_scripts', 'hangups')()
 File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/hangups/ui/__main__.py", line 1140, in main
   datetimefmt, notifier_, args.discreet_notifications
 File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/hangups/ui/__main__.py", line 135, in __init__
   loop.run_until_complete(task)
 File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/base_events.py", line 468, in run_until_complete
   return future.result()
concurrent.futures._base.CancelledError

@tdryer
Copy link
Owner

tdryer commented Jul 15, 2018

I just released 0.4.5 which supports Python 3.7.

@psonis
Copy link
Author

psonis commented Jul 16, 2018

I just re-installed 3.7 and 0.4.5 but I get this error after logging...

File "/Library/Frameworks/Python.framework/Versions/3.7/bin/hangups", line 11, in <module> load_entry_point('hangups==0.4.5', 'console_scripts', 'hangups')() File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/hangups/ui/__main__.py", line 1140, in main datetimefmt, notifier_, args.discreet_notifications File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/hangups/ui/__main__.py", line 147, in __init__ raise self._exception # pylint: disable=raising-bad-type File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/sslproto.py", line 526, in data_received ssldata, appdata = self._sslpipe.feed_ssldata(data) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/sslproto.py", line 189, in feed_ssldata self._sslobj.do_handshake() File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py", line 763, in do_handshake self._sslobj.do_handshake() ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1045)

@psonis psonis reopened this Jul 16, 2018
@tdryer
Copy link
Owner

tdryer commented Jul 17, 2018

There's a report here that installing openssl fixed that: #181 (comment)

@psonis
Copy link
Author

psonis commented Jul 17, 2018

Well, macOS openssl was the culprit.
I removed the "official" Python 3.7 and installed this one
brew install python --with-brewed-openssl
and it worked.

BUT...
after using it for 10-15 minutes, it crashed :(
Here's the traceback:

File "/usr/local/bin/hangups", line 11, in <module> sys.exit(main()) File "/usr/local/lib/python3.7/site-packages/hangups/ui/__main__.py", line 1140, in main datetimefmt, notifier_, args.discreet_notifications File "/usr/local/lib/python3.7/site-packages/hangups/ui/__main__.py", line 147, in __init__ raise self._exception # pylint: disable=raising-bad-type File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/selector_events.py", line 812, in _read_ready__data_received data = self._sock.recv(self.max_size) OSError: [Errno 65] No route to host

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

No branches or pull requests

3 participants