RustyRin / bandcamp-api

A simple way to get info from Bandcamp
GNU General Public License v3.0
10 stars 2 forks source link

AttributeError: 'NoneType' object has no attribute 'find_all' (when no artist is found) #2

Closed matkoniecz closed 1 year ago

matkoniecz commented 1 year ago
from bandcamp_api import Bandcamp
bc = Bandcamp()
bc.search_artist("Jacek Kaczmarski")

results in

Traceback (most recent call last):
  File "bug.py", line 3, in <module>
    bc.search_artist("Jacek Kaczmarski")
  File "/home/mateusz/.local/lib/python3.8/site-packages/bandcamp_api/bandcamp_api.py", line 123, in search_artist
    return search_artists(search_string=search_string)
  File "/home/mateusz/.local/lib/python3.8/site-packages/bandcamp_api/search.py", line 24, in search_artists
    for item in results.find_all("li"):
AttributeError: 'NoneType' object has no attribute 'find_all'
RustyRin commented 1 year ago

Dev branch already has this fixed, just uses different objects iirc, will try to put it on main soon ™️

RustyRin commented 1 year ago

the fix is now live