3jackdaws / soundcloud-lib

Soundcloud API wrapper for tracks & playlists that doesn't require API credentials. Asyncio support.
MIT License
94 stars 24 forks source link

NoneType' object has no attribute 'timeout #13

Closed indigoswann closed 4 years ago

indigoswann commented 4 years ago

Hi, package looks great, but I get an error, #5

Version: 0.5.1 Pyton 3.8

" File \"/var/task/SoundcloudInterface.py\", line 15, in processor\n playlist = api.resolve(\"https://soundcloud.com/wedontmindchaos/find-me-by-your-side-remake\")\n", " File \"/var/task/sclib/sync.py\", line 56, in resolve\n self.get_credentials()\n", " File \"/var/task/sclib/sync.py\", line 51, in get_credentials\n script_text = get_page(script_url)\n", " File \"/var/task/sclib/sync.py\", line 14, in get_page\n return get_url(url).decode('utf-8')\n", " File \"/var/task/sclib/sync.py\", line 11, in get_url\n return urlopen(url).read()\n", " File \"/var/lang/lib/python3.8/urllib/request.py\", line 222, in urlopen\n return opener.open(url, data, timeout)\n", " File \"/var/lang/lib/python3.8/urllib/request.py\", line 515, in open\n req.timeout = timeout\n"

indigoswann commented 4 years ago

I resolved by updating sclib/util.py

Line 18

if '49-' in src.split('/')[-1]: