bandcamp-dl: AttributeError: 'NoneType' object has no attribute 'string'
Python version: 3.8.6
Bandcamp-dl version: bandcamp_downloader-0.0.8.post12-py3-none-any.whl
installed from pip3 on debian sid
Bancamp-dl options: none
url: none
options: none
Describe the issue:
$ bandcamp-dl
Traceback (most recent call last):
File "/home/phoe/.local/bin/bandcamp-dl", line 8, in <module>
sys.exit(main())
File "/home/phoe/.local/lib/python3.8/site-packages/bandcamp_dl/__main__.py", line 93, in main
album = bandcamp.parse(url, True, arguments['--embed-lyrics'], arguments['--debug'])
File "/home/phoe/.local/lib/python3.8/site-packages/bandcamp_dl/bandcamp.py", line 40, in parse
bandcamp_json = BandcampJSON(self.soup, debugging).generate()
File "/home/phoe/.local/lib/python3.8/site-packages/bandcamp_dl/bandcampjson.py", line 25, in generate
self.js_to_json()
File "/home/phoe/.local/lib/python3.8/site-packages/bandcamp_dl/bandcampjson.py", line 50, in js_to_json
self.get_js()
File "/home/phoe/.local/lib/python3.8/site-packages/bandcamp_dl/bandcampjson.py", line 37, in get_js
self.js_data = self.body.find("script", {"src": False}, text=re.compile(self.target)).string
AttributeError: 'NoneType' object has no attribute 'string'
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 2
- Comments: 15 (2 by maintainers)
A slightly easier way to install from source is running
Installed latest version from PyPI
Pip reported version as
0.0.9.post1
bandcamp-dl --version
0.0.9-01
Downloading works without errors!
https://github.com/git-guides/install-git
hi! i was getting the same error showed above, and uninstalling the old version and installing the latest version built from source (obtained via the link in the main page here in github) made things work here. i also had to point the
python
command to usepython3
in the meanwhile, because bandcamp-dl was using the version provided bypython
, and in my case that was 2.7.something.in sum:
Looks like pypi has the old version; the latest version built from the source is bandcamp-dl 0.0.9-01
I suggest you install it from the source if you need it to work. The version 0.0.9-01 (latest from source) works fine for me.