albertcht / python-gcs-image

MIT License
69 stars 28 forks source link

bccache.py", line 26: def get(self, key: str) -> bytes: ^ SyntaxError: invalid syntax #10

Open bogdannedelcu opened 2 years ago

bogdannedelcu commented 2 years ago

Hi, I used this in the past and all worked well. The services still work and return valid URL of the image.

Not on a brand new instalation I get error when accessing any URL like the one bellow:

File "/base/data/home/apps/e~uwin-develop-d6298/20211119t184208.439520163638429856/lib/jinja2/bccache.py", line 26: def get(self, key: str) -> bytes: ^ SyntaxError: invalid syntax at (/base/data/home/apps/e~uwin-develop-d6298/20211119t184208.439520163638429856/lib/jinja2/init.py:5) at (/base/data/home/apps/e~uwin-develop-d6298/20211119t184208.439520163638429856/lib/flask/init.py:19) at (/base/data/home/apps/e~uwin-develop-d6298/20211119t184208.439520163638429856/main.py:5)

I installed the latest version, python is 2.7... any advice is apreciated.

shapkar commented 2 years ago

@bogdannedelcu I face the same issue, did you find a solution? Thank you!

bogdannedelcu commented 2 years ago

Did not, the old services still work but installing a mew one gives this error.

PS-istarostenko commented 2 years ago

@bogdannedelcu I was able to fix it by downgrading Flask to 0.12.5 in requirements.txt. Delete the lib directory and run pip install -r requirements.txt -t lib again.

bogdannedelcu commented 2 years ago

@PS-istarostenko great job! it works for me too