Skip to content
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

Open
L022937 opened this issue Aug 1, 2023 · 4 comments
Open

messytables==0.15.2 is broken for python3.10 #199

L022937 opened this issue Aug 1, 2023 · 4 comments

Comments

@L022937
Copy link

L022937 commented Aug 1, 2023

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)

@cman1966
Copy link

cman1966 commented Aug 3, 2023

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.

@kautukraj
Copy link

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 from collections.abc import Mapping. For anyone looking for a detailed explanation of this issue, see this question.

@tB0nE
Copy link

tB0nE commented Dec 12, 2023

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?

@kota7
Copy link

kota7 commented Apr 20, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants