-
-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm get stuck on if __name__ == '__main__': freeze_support() help me :) #12
Comments
You just need to put your code inside a main block like this:
|
now i'm get error again : Traceback (most recent call last): |
Make sure that this |
To Reproduce
Steps to reproduce the behavior:
i'm running this code in visual code :
from ninjemail import Ninjemail
ninja = Ninjemail(
browser="undetected-chrome",
captcha_keys={"capsolver": "keys"},
sms_keys={"5sim": {"token": "keys"}},
auto_proxy=True
)
email, password = ninja.create_gmail_account(
username="username",
password="password",
first_name="Daniel",
last_name="Erfanda",
birthdate="16-02-1982",
use_proxy=True
)
print(f"Email: {email}")
print(f"Password: {password}")
Desktop (please complete the following information):
Additional context
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\Paulus\AppData\Local\Programs\Python\Python312\Lib\multiprocessing\spawn.py", line 122, in spawn_main
exitcode = _main(fd, parent_sentinel)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Paulus\AppData\Local\Programs\Python\Python312\Lib\multiprocessing\spawn.py", line 131, in _main
prepare(preparation_data)
File "C:\Users\Paulus\AppData\Local\Programs\Python\Python312\Lib\multiprocessing\spawn.py", line 246, in prepare
_fixup_main_from_path(data['init_main_from_path'])
File "C:\Users\Paulus\AppData\Local\Programs\Python\Python312\Lib\multiprocessing\spawn.py", line 297, in _fixup_main_from_path
main_content = runpy.run_path(main_path,
^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 286, in run_path
File "", line 98, in _run_module_code
File "", line 88, in run_code
File "g:\gmailcreator4\ninjemail\test.py", line 10, in
email, password = ninja.create_gmail_account(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "g:\gmailcreator4\ninjemail\ninjemail\ninjemail_manager.py", line 220, in create_gmail_account
driver = create_driver(self.browser, proxy=proxy)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "g:\gmailcreator4\ninjemail\ninjemail\utils\webdriver_utils.py", line 200, in create_driver
driver = uc.Chrome(options=options, headless=True, use_subprocess=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Paulus\AppData\Local\Programs\Python\Python312\Lib\site-packages\undetected_chromedriver_init.py", line 448, in init
self.browser_pid = start_detached(
^^^^^^^^^^^^^^^
File "C:\Users\Paulus\AppData\Local\Programs\Python\Python312\Lib\site-packages\undetected_chromedriver\dprocess.py", line 35, in start_detached
).start()
^^^^^^^
File "C:\Users\Paulus\AppData\Local\Programs\Python\Python312\Lib\multiprocessing\process.py", line 121, in start
self._popen = self._Popen(self)
^^^^^^^^^^^^^^^^^
File "C:\Users\Paulus\AppData\Local\Programs\Python\Python312\Lib\multiprocessing\context.py", line 224, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Paulus\AppData\Local\Programs\Python\Python312\Lib\multiprocessing\context.py", line 337, in _Popen
return Popen(process_obj)
^^^^^^^^^^^^^^^^^^
File "C:\Users\Paulus\AppData\Local\Programs\Python\Python312\Lib\multiprocessing\popen_spawn_win32.py", line 46, in init
prep_data = spawn.get_preparation_data(process_obj._name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Paulus\AppData\Local\Programs\Python\Python312\Lib\multiprocessing\spawn.py", line 164, in get_preparation_data
_check_not_importing_main()
File "C:\Users\Paulus\AppData\Local\Programs\Python\Python312\Lib\multiprocessing\spawn.py", line 140, in _check_not_importing_main
raise RuntimeError('''
RuntimeError:
An attempt has been made to start a new process before the
current process has finished its bootstrapping phase.
The text was updated successfully, but these errors were encountered: