livechat / lc-sdk-python

https://pypi.org/project/lc-sdk-python/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sintax error while importing modules in python 3.7

pedro-lopes97 opened this issue · comments

commented

I installed this package on pyhthon 3.7 and i got this error when i was importing a module. The := operator is only available in python 3.8.

from livechat.agent.web.client import AgentWeb
Traceback (most recent call last):
File "", line 1, in
File "/Users/pedrolopes/.pyenv/versions/3.7.2/lib/python3.7/site-packages/livechat/agent/init.py", line 2, in
from livechat.agent.rtm.client import AgentRTM
File "/Users/pedrolopes/.pyenv/versions/3.7.2/lib/python3.7/site-packages/livechat/agent/rtm/client.py", line 10, in
from livechat.utils.ws_client import WebsocketClient
File "/Users/pedrolopes/.pyenv/versions/3.7.2/lib/python3.7/site-packages/livechat/utils/ws_client.py", line 80
while not (response := next((item for item in self.messages
^
SyntaxError: invalid syntax

Hi Pedro,

You need to upgrade your python to 3.8 or above, where "walrus operator" is supported: https://www.python.org/dev/peps/pep-0572/#syntax-and-semantics