Exceen / 4chan-downloader

Python3 script to continuously download all images/webms of multiple 4chan thread simultaneously - without installation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

multiple threads from file error

th3illu opened this issue · comments

File "Python\Python38-32\lib\multiprocessing\process.py", line 315, in _bootstrap
self.run()
Process Process-1:
File "Python\Python38-32\lib\multiprocessing\process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "4chdl\inb4404.py", line 44, in download_thread
if args.use_names or os.path.exists(os.path.join(workpath, 'downloads', board, thread_tmp)):
AttributeError: 'NoneType' object has no attribute 'use_names'
Traceback (most recent call last):
File "Python\Python38-32\lib\multiprocessing\process.py", line 315, in _bootstrap
self.run()
File "Programs\Python\Python38-32\lib\multiprocessing\process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "4chdl\inb4404.py", line 44, in download_thread
if args.use_names or os.path.exists(os.path.join(workpath, 'downloads', board, thread_tmp)):
AttributeError: 'NoneType' object has no attribute 'use_names'

Please download the current version of this script, don't modify anything and try again.

Please download the current version of this script, don't modify anything and try again.

I have the same issue. can you please help. I can download from url but can't download with .txt file that has links. all lines are url lines.

Capture

Please download the current version of this script, don't modify anything and try again.

I have the same issue. can you please help. I can download from url but can't download with .txt file that has links. all lines are url lines.

Capture

try ./inb4404.py ur.txt

How exactly are you trying to execute this script?

commented

Same here. Python 3.8.3 64-bit, tried standard CMD, powershell and even on Linux, gives the same error all the time. Tried running it by python inb4404.py threads.txt. This version of python is the only one installed so no py2 happening.
image
EDIT: it's on line 68 because I edited the code a bit. In your version, the error is on line 65.

I believe the cause of the issue lies with how Python starts child processes on different platforms. On Unix the default start method is "fork", which creates a child process identical to the parent process. On Windows the default (and only available) start method is "spawn", which starts a fresh Python interpreter process.
https://docs.python.org/3/library/multiprocessing.html#contexts-and-start-methods

Passing args as additional parameter to download_thread fixes the issue.