bandcamp-dl icon indicating copy to clipboard operation
bandcamp-dl copied to clipboard

Trying to download discography, getting: AttributeError: 'NoneType' object has no attribute 'string'

Open curtissimo41 opened this issue 6 months ago • 0 comments

Bug Description When trying to download a discography, bandcamp-dl is returning the error message: "AttributeError: 'NoneType' object has no attribute 'string'".

To Reproduce Command to reproduce the behavior: bandcamp-dl https://<artist>.bandcamp.com/

Expected behavior Attempting to run the command will return the AttributeError message.

Logs

Traceback (most recent call last):
  File "/home/curtis/.local/bin/bandcamp-dl", line 8, in <module>
    sys.exit(main())
  File "/home/curtis/.local/lib/python3.10/site-packages/bandcamp_dl/__main__.py", line 98, in main
    album_list.append(bandcamp.parse(url, not arguments['--no-art'], arguments['--embed-lyrics'],
  File "/home/curtis/.local/lib/python3.10/site-packages/bandcamp_dl/bandcamp.py", line 42, in parse
    bandcamp_json = BandcampJSON(self.soup, debugging).generate()
  File "/home/curtis/.local/lib/python3.10/site-packages/bandcamp_dl/bandcampjson.py", line 17, in generate
    self.get_js()
  File "/home/curtis/.local/lib/python3.10/site-packages/bandcamp_dl/bandcampjson.py", line 28, in get_js
    embedded_scripts_raw = [self.body.find("script", {"type": "application/ld+json"}).string]
AttributeError: 'NoneType' object has no attribute 'string'

Desktop:

  • OS: Linux Mint
  • Version: 21.3 (Virginia)
  • Python Version: 3.10.12

curtissimo41 avatar Aug 10 '24 19:08 curtissimo41