NameError: name 'response' is not defined - The script for executing the download, when the file does not exist in the collection
Opened this issue · 0 comments
The script for executing the download, when the file does not exist in the collection (the ideal is to go to the next existing file) in packtpub in the user account, for example, this file does not exist in my account:
Quantum_Computing_with_Silq_Programming.mobi
Finished /home/test/Desktop/packtpub/packtpub-downloader/downloads/Quantum_Computing_with_Silq_Programming/Quantum_Computing_with_Silq_Programming.epub
Starting to download /home/test/Desktop/packtpub/packtpub-downloader/downloads/Quantum_Computing_with_Silq_Programming/Quantum_Computing_with_Silq_Programming.mobi
Traceback (most recent call last):
File "/home/test/Desktop/packtpub/packtpub-downloader/main.py", line 226, in
main(sys.argv[1:])
File "/home/test/Desktop/packtpub/packtpub-downloader/main.py", line 218, in main
download_book(filename, url)
File "/home/test/Desktop/packtpub/packtpub-downloader/main.py", line 107, in download_book
f.write(response.content)
NameError: name 'response' is not defined