Skip to content

AttributeError: 'HTTPError' object has no attribute 'replace' #220

@hitsfromdabong

Description

@hitsfromdabong

Running soundscrape https://soundcloud.com/twsounds/paula-temple-live-at-time-warp-2018 results in:

Downloading: Paula Temple live at Time Warp Mannheim 2018
Problem downloading Paula Temple live at Time Warp Mannheim 2018
Traceback (most recent call last):
  File "/usr/local/bin/soundscrape", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/site-packages/soundscrape/soundscrape.py", line 119, in main
    process_soundcloud(vargs)
  File "/usr/local/lib/python2.7/site-packages/soundscrape/soundscrape.py", line 292, in process_soundcloud
    id3_extras=id3_extras)
  File "/usr/local/lib/python2.7/site-packages/soundscrape/soundscrape.py", line 460, in download_tracks
    puts_safe(e)
  File "/usr/local/lib/python2.7/site-packages/soundscrape/soundscrape.py", line 1315, in puts_safe
    puts(text)
  File "/usr/local/lib/python2.7/site-packages/clint/textui/core.py", line 57, in puts
    s = tsplit(s, NEWLINES)
  File "/usr/local/lib/python2.7/site-packages/clint/utils.py", line 69, in tsplit
    string = string.replace(i, final_delimiter)
AttributeError: 'HTTPError' object has no attribute 'replace'

This is a problem with urllib. soundscrape was installed with brew and ran under python v 2.7.

Running with python v 3 fixes the problem.

Quick fix:

git clone https://github.com/Miserlou/SoundScrape
cd SoundScrape
while read p; do; pip3 install $p; done < requirements.txt
[OR: pip3 install -r requirements.txt]
cd soundscrape
python3 soundscrape [...]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions