No such file or directory: 'browsers.json'
See original GitHub issuePrerequisites
Description
newest versions looks for browser.json not in main directory but the working directory of the command window ( in my case the downloadlistdirectory)
When I copy the browser.json to my downloadlistdirectory ( which is the working directory), then it works. But I guess it should work when the file is with the other program files.
[Description of the bug or feature]
Steps to Reproduce
probably just starting pixivdownloader from a different working directory
- [First Step]
- [Second Step]
- [and so on…]
Expected behavior: [What you expected to happen] pixiv starts normal
Actual behavior: [What actually happened] error Traceback (most recent call last): File “<frozen importlib._bootstrap>”, line 991, in _find_and_load File “<frozen importlib._bootstrap>”, line 975, in _find_and_load_unlocked File “<frozen importlib._bootstrap>”, line 655, in _load_unlocked File “<frozen importlib._bootstrap>”, line 618, in _load_backward_compatible File “<frozen zipimport>”, line 259, in load_module File “PixivArtistHandler.pyc”, line 9, in <module> File “<frozen importlib._bootstrap>”, line 991, in _find_and_load File “<frozen importlib._bootstrap>”, line 975, in _find_and_load_unlocked File “<frozen importlib._bootstrap>”, line 655, in _load_unlocked File “<frozen importlib._bootstrap>”, line 618, in _load_backward_compatible File “<frozen zipimport>”, line 259, in load_module File “PixivBrowserFactory.pyc”, line 26, in <module> File “<frozen importlib._bootstrap>”, line 991, in find_and_load File “<frozen importlib._bootstrap>”, line 975, in find_and_load_unlocked File “<frozen importlib._bootstrap>”, line 655, in load_unlocked File “<frozen importlib._bootstrap>”, line 618, in load_backward_compatible File “<frozen zipimport>”, line 259, in load_module File “PixivOAuth.pyc”, line 16, in <module> File “PixivOAuth.pyc”, line 30, in PixivOAuth File "cloudscraper_init.pyc", line 748, in create_scraper File "cloudscraper_init.pyc", line 136, in init File "cloudscraper\user_agent_init.pyc", line 20, in init File "cloudscraper\user_agent_init.pyc", line 78, in loadUserAgent FileNotFoundError: [Errno 2] No such file or directory: ‘browsers.json’
Versions
PixivDownloader2 version 20201025
You can get this information from executing PixivUtil2.py --help
.
Latest version available in https://github.com/Nandaka/PixivUtil2/releases
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (4 by maintainers)
can you try the latest version, I tried to patch the lib so it will resolve the browser.json from the executable location
If you run from source code, then yes. It is limitation of the library if compiled using py2exe.