MTAPI icon indicating copy to clipboard operation
MTAPI copied to clipboard

HTTP Error code: 255 - Is this an issue with python3.10?

Open thagoober opened this issue 2 years ago • 2 comments

Making note of a weird error in my aws instance, throwing me an error with import mapping innit.py

Think it might be because python 3.10 has a change re collections to collections.abc ?

Possible code fix might be:

try: from collections.abc import Mapping except ImportError: from collections import Mapping

thagoober avatar May 04 '23 20:05 thagoober

I can confirm that using an older version of python fixes the issue. 3.8.16 works fine.

You should be able to install, alongside your current version, an older version of python on your aws instance. Then installing/running like this works.

$ python3.8 -m venv .venv
$ source .venv/bin/activate
$ python3.8 -m pip install -r requirements.txt
$ python3.8 app.py

jonhanford avatar Aug 05 '23 14:08 jonhanford

I was unable to reproduce the error myself on a macbook, but my best guess is maybe it's caused by an old version of Flask on a new version of python. I recently updated the Flask dependency; does the latest commit at https://github.com/jonthornton/MTAPI/commit/d85e63545a0397ef30d4434abd617aab2e928ce4 fix the error for you?

jonthornton avatar Aug 09 '23 02:08 jonthornton