-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
messytables==0.15.2 is broken for python3.10 #199
Comments
A pure hack, but updating site-packages/messytables/core.py to change "from collections import Mapping" to "from collections.abc import mapping" worked for me. |
I would like to point out a small error here, it should be |
I had the same issue, my solution was to manually edit the file in my Dockerfile after I imported it yolo. Can't we get a new release? |
Just in case this helps someone, the code below does the suggested edits on google colab. filename = "/usr/local/lib/python3.10/dist-packages/messytables/core.py"
print("Before:")
!cat {filename} | grep import
!sed -e 's/from collections import Mapping/from collections.abc import Mapping/g' {filename} > tmp.txt
print()
print("Check:")
!cat tmp.txt | grep import
!mv tmp.txt {filename}
print()
print("After:")
!cat {filename} | grep import |
messytables==0.15.2 is broken for python3.10
File "/home/airflow/.local/lib/python3.10/site-packages/messytables/headers.py", line 3, in
from messytables.core import Cell
File "/home/airflow/.local/lib/python3.10/site-packages/messytables/core.py", line 2, in
from collections import Mapping
ImportError: cannot import name 'Mapping' from 'collections' (/usr/local/lib/python3.10/collections/init.py)
The text was updated successfully, but these errors were encountered: