pseudonym117/Riot-Watcher

Problem when using riotwatcher in an SSH server

eljequercin opened this issue · 2 comments

I have developed a code in visual Studio Code for windows 10 using riotwatcher, but when I uses it in a SSH server I have this problem

Traceback (most recent call last):
  File "test.py", line 1, in <module>
    from riotwatcher import LolWatcher, ApiError
  File "/home/diego_cuenca_prieto/.local/lib/python3.5/site-packages/riotwatcher/__init__.py", line 1, in <module>
    from .exceptions import ApiError, TimeoutError
  File "/home/diego_cuenca_prieto/.local/lib/python3.5/site-packages/riotwatcher/exceptions.py", line 3, in <module
>
    from .Handlers import ApiError as _ApiError
  File "/home/diego_cuenca_prieto/.local/lib/python3.5/site-packages/riotwatcher/Handlers/__init__.py", line 3, in 
<module>
    from .DeprecationHandler import DeprecationHandler
  File "/home/diego_cuenca_prieto/.local/lib/python3.5/site-packages/riotwatcher/Handlers/DeprecationHandler.py", l
ine 31
    key = f"{endpoint_name}.{method_name}"
                                         ^
SyntaxError: invalid syntax

It will be very useful if anyone know how to solve it

Check to make sure that you are using the same version of python on both machines. python --version

My assumption is that on windows 10 you have python3 installed, and the machine that you are connecting to via ssh has python2.7 installed.

Screen Shot 2020-06-25 at 9 17 57 AM

From the error, it looks like you have python 3.5 installed on your ssh server. RiotWatcher only supports python 3.6 and newer.

If you update your python version, there should be no issue