mtakaki / cachet-url-monitor

URL monitor plugin for cachethq.io
MIT License
124 stars 48 forks source link

SyntaxError: invalid syntax #103

Closed ProfessorVarox closed 4 years ago

ProfessorVarox commented 4 years ago

Hello, when I wanted to install this error appears again and again.

I'm using Python v3.5.3 on Debian 9

Error:

(venv) root@InfinitySystems:~/cachet-url-monitor# python3 cachet_url_monitor/scheduler.py config.yml
  File "cachet_url_monitor/scheduler.py", line 59
    configuration: Configuration
                 ^
SyntaxError: invalid syntax

I appreciate your help

trevanyoung commented 4 years ago

@ProfessorVarox were you able to get past this issue ? I'm running into the exact same problem. Ubuntu 16.04 here, Python v2.7.12

mtakaki commented 4 years ago

@ProfessorVarox you must be using an older version of python. Which exact version are you using? Could you please run this?

$ python --version

You should get something like this in order to have it work propery (or at least 3.5):

Python 3.7.3

@trevanyoung you need at least python 3.5 in order to support type hints.

ProfessorVarox commented 4 years ago

Should I use Python v2?

I'll try it later

trevanyoung commented 4 years ago

@ProfessorVarox I have Python 3.5.2 and Python 2.7.12. I get the same error trying to run the file with python 2 and 3.

mtakaki commented 4 years ago

@ProfessorVarox @trevanyoung could you please try it with python 3.7.7? That's what I'm using and it's completely normal and even the build is passing...

mtakaki commented 4 years ago

You can see the build is running 3.7.2: https://github.com/mtakaki/cachet-url-monitor/blob/master/.circleci/config.yml#L11

ProfessorVarox commented 4 years ago

Hello, I tried it with Python 3.7.7 and it works!

Thanks a lot for your help