Closed iht76 closed 3 years ago
Thanks for reporting this issue, we are on it :)
Hi, how have you installed the package? was it via pip
or git clone
? could you git clone
the repo and then run the unittests by bash run_tests.sh YOUR_API_KEY
(key without quotation marks) and let me know if you are still getting an error?
i tried both ways to install it... same problem. Havent run the tests yet.
Alright kindly run the tests and let me know if the error appears there as well as it doesn't appear on my end. I would expect the tests regarding the PRO functionality to fail if you don't have an elevated etherscan account, however the rest should run fine.
I am closing this issue because I cannot reproduce it, feel free to re-open it. Thanks.
from etherscan.etherscan import Etherscan api_key = 'xxxxxxx'
eth = Etherscan(api_key)
Traceback (most recent call last): File "C:/Python39-32/test.py", line 4, in
eth = Etherscan(api_key)
File "C:\Python39-32\lib\site-packages\etherscan\etherscan.py", line 14, in new
with resources.path(configs, "stable.json") as path:
File "C:\Python39-32\lib\importlib\resources.py", line 165, in path
_common.as_file(files(package).joinpath(_normalize_path(resource)))
File "C:\Python39-32\lib\importlib\resources.py", line 147, in files
return _common.from_package(_get_package(package))
File "C:\Python39-32\lib\importlib_common.py", line 14, in from_package
return fallback_resources(package.spec)
File "C:\Python39-32\lib\importlib_common.py", line 18, in fallback_resources
package_directory = pathlib.Path(spec.origin).parent
File "C:\Python39-32\lib\pathlib.py", line 1071, in new
self = cls._from_parts(args, init=False)
File "C:\Python39-32\lib\pathlib.py", line 696, in _from_parts
drv, root, parts = self._parse_args(args)
File "C:\Python39-32\lib\pathlib.py", line 680, in _parse_args
a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType