No sync module in websockets
twf66 opened this issue · comments
Did you import websockets.sync.server
?
I suspect that your problem is the same problem demonstrated below without involving websockets:
$ python3
Python 3.10.10 (main, Feb 8 2023, 05:34:50) [Clang 14.0.0 (clang-1400.0.29.202)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import urllib
>>> urllib.parse.quote
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'urllib' has no attribute 'parse'
>>> import urllib.parse
>>> urllib.parse.quote
<function quote at 0x1049689d0>
@aaugustin Thank You! Your import suggestion was the answer. I did try various import statements, but just did not have it quite right.