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

problem when importing RacksDB from racksdb #18

Closed
florianLSP opened this issue Jul 10, 2023 · 0 comments
Closed

problem when importing RacksDB from racksdb #18

florianLSP opened this issue Jul 10, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@florianLSP
Copy link
Contributor

The problem come from the word "types", there is a collision between the "types" in Python and "types" in racksdb project. Need to replace the word "types" in the project to solve the problem.

florian@florian:~/Desktop$ python3 ~/Desktop/racksdb_projet/racksdb/racksdb/test.py 
Traceback (most recent call last):
  File "/home/florian/Desktop/racksdb_projet/racksdb/racksdb/test.py", line 1, in <module>
    from racksdb import RacksDB
  File "/usr/lib/python3/dist-packages/racksdb/__init__.py", line 20, in <module>
    from pathlib import Path
  File "/usr/lib/python3.10/pathlib.py", line 1, in <module>
    import fnmatch
  File "/usr/lib/python3.10/fnmatch.py", line 14, in <module>
    import re
  File "/usr/lib/python3.10/re.py", line 124, in <module>
    import enum
  File "/usr/lib/python3.10/enum.py", line 2, in <module>
    from types import MappingProxyType, DynamicClassAttribute
ImportError: cannot import name 'MappingProxyType' from 'types' (/home/florian/Desktop/racksdb_projet/racksdb/racksdb/types/__init__.py)
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 62, in apport_excepthook
    if not enabled():
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 24, in enabled
    import re
  File "/usr/lib/python3.10/re.py", line 124, in <module>
    import enum
  File "/usr/lib/python3.10/enum.py", line 2, in <module>
    from types import MappingProxyType, DynamicClassAttribute
ImportError: cannot import name 'MappingProxyType' from 'types' (/home/florian/Desktop/racksdb_projet/racksdb/racksdb/types/__init__.py)

Original exception was:
Traceback (most recent call last):
  File "/home/florian/Desktop/racksdb_projet/racksdb/racksdb/test.py", line 1, in <module>
    from racksdb import RacksDB
  File "/usr/lib/python3/dist-packages/racksdb/__init__.py", line 20, in <module>
    from pathlib import Path
  File "/usr/lib/python3.10/pathlib.py", line 1, in <module>
    import fnmatch
  File "/usr/lib/python3.10/fnmatch.py", line 14, in <module>
    import re
  File "/usr/lib/python3.10/re.py", line 124, in <module>
    import enum
  File "/usr/lib/python3.10/enum.py", line 2, in <module>
    from types import MappingProxyType, DynamicClassAttribute
ImportError: cannot import name 'MappingProxyType' from 'types' (/home/florian/Desktop/racksdb_projet/racksdb/racksdb/types/__init__.py)

@florianLSP florianLSP added the bug Something isn't working label Jul 10, 2023
@rezib rezib self-assigned this Jul 11, 2023
@rezib rezib closed this as completed in d09ed84 Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants