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

TypeError: expected str, bytes or os.PathLike object, not NoneType #5

Closed
iht76 opened this issue Dec 2, 2020 · 5 comments
Closed

Comments

@iht76
Copy link

iht76 commented Dec 2, 2020

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

@github-actions
Copy link

github-actions bot commented Dec 2, 2020

Thanks for reporting this issue, we are on it :)

@iht76 iht76 closed this as completed Dec 2, 2020
@iht76 iht76 reopened this Dec 2, 2020
@pcko1
Copy link
Owner

pcko1 commented Dec 2, 2020

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?

@iht76
Copy link
Author

iht76 commented Dec 2, 2020

i tried both ways to install it... same problem. Havent run the tests yet.

@pcko1
Copy link
Owner

pcko1 commented Dec 2, 2020

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.

@pcko1
Copy link
Owner

pcko1 commented Dec 4, 2020

I am closing this issue because I cannot reproduce it, feel free to re-open it. Thanks.

@pcko1 pcko1 closed this as completed Dec 4, 2020
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

2 participants