'importing tronweb shows import error: cannot import name 'hashable' from 'collections'
After installing tronweb using 'pip install tronweb', when I try to import but it shows an import error which is cannot import name 'hashable' from 'collections'
Solution 1:[1]
Search by error message for the import instruction and you should edit:
from collections import Hashable
to:
from collections.abc import Hashable
It was moved from collections to collections.abc since Python 3.3. It supported the old location till Python 3.9. But in python 3.10 it was removed.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Habib Kenjrawy |