Skip to content
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

python preprocess.py error #211

Open
LetsPlayPong opened this issue Oct 22, 2020 · 5 comments
Open

python preprocess.py error #211

LetsPlayPong opened this issue Oct 22, 2020 · 5 comments

Comments

@LetsPlayPong
Copy link

text_dict = ljspeech(path)
with open(f'{paths.data}text_dict.pkl', 'wb') as f:
pickle.dump(text_dict, f)

i commented the above out in preprocess.py. then the following happened

D:\projects\anacanda-voice-project\WaveRNN-master\WaveRNN-master>python preproce
ss.py --path witch-wife_2010_librivox

File "preprocess.py", line 77
n_workers = max(1, args.num_workers)
^
IndentationError: expected an indented block

when I corrected the above and ran this again:

python preprocess.py --path witch-wife_2010_librivox

ran the above line and the the whole program crashed. I can't seemed to copy the error after this since it crashed. i spend about 2 days trying to get this up and running.

@fatchord
Copy link
Owner

fatchord commented Nov 1, 2020

Hmm, that's an indentation error - its just formatting. Maybe try opening the preprocess file in pycharm or similar and see if there are any errrors there in the code editor.

Are you new to python? what version are you running?

@LetsPlayPong
Copy link
Author

Hmm, that's an indentation error - its just formatting. Maybe try opening the preprocess file in pycharm or similar and see if there are any errrors there in the code editor.

Are you new to python? what version are you running?

I think i figured it out. I'm using the wrong python version. it says 3.6 i think. I gotta check.

@LetsPlayPong
Copy link
Author

Hmm, that's an indentation error - its just formatting. Maybe try opening the preprocess file in pycharm or similar and see if there are any errrors there in the code editor.

Are you new to python? what version are you running?

python 3.8 window 7.

@LetsPlayPong
Copy link
Author

Hmm, that's an indentation error - its just formatting. Maybe try opening the preprocess file in pycharm or similar and see if there are any errrors there in the code editor.

Are you new to python? what version are you running?

context=self.get_context())

File "C:\Users\newd\miniconda3\envs\py36-32bit\lib\multiprocessing\pool.py", l
ine 174, in init
self._repopulate_pool()
File "C:\Users\newd\miniconda3\envs\py36-32bit\lib\multiprocessing\pool.py", l
ine 239, in _repopulate_pool
w.start()
File "C:\Users\newd\miniconda3\envs\py36-32bit\lib\multiprocessing\process.py"
, line 105, in start
self._popen = self._Popen(self)
File "C:\Users\newd\miniconda3\envs\py36-32bit\lib\multiprocessing\context.py"
, line 322, in _Popen
return Popen(process_obj)
File "C:\Users\newd\miniconda3\envs\py36-32bit\lib\multiprocessing\popen_spawn
_win32.py", line 33, in init
prep_data = spawn.get_preparation_data(process_obj._name)
File "C:\Users\newd\miniconda3\envs\py36-32bit\lib\multiprocessing\spawn.py",
line 143, in get_preparation_data
_check_not_importing_main()
File "C:\Users\newd\miniconda3\envs\py36-32bit\lib\multiprocessing\spawn.py",
line 136, in _check_not_importing_main
is not going to be frozen to produce an executable.''')
RuntimeError:
An attempt has been made to start a new process before the
current process has finished its bootstrapping phase.

    This probably means that you are not using fork to start your
    child processes and you have forgotten to use the proper idiom
    in the main module:

        if __name__ == '__main__':
            freeze_support()
            ...

    The "freeze_support()" line can be omitted if the program
    is not going to be frozen to produce an executable.

5 wav files found in "witch-wife_2010_librivox"

+-------------+-----------+--------+------------+-----------+
| Sample Rate | Bit Depth | Mu Law | Hop Length | CPU Usage |
+-------------+-----------+--------+------------+-----------+
| 22050 | 9 | True | 275 | 7/8 |
+-------------+-----------+--------+------------+-----------+

Traceback (most recent call last):
File "", line 1, in
File "C:\Users\newd\miniconda3\envs\py36-32bit\lib\multiprocessing\spawn.py",
line 105, in spawn_main
exitcode = _main(fd)
File "C:\Users\newd\miniconda3\envs\py36-32bit\lib\multiprocessing\spawn.py",
line 114, in _main
prepare(preparation_data)
File "C:\Users\newd\miniconda3\envs\py36-32bit\lib\multiprocessing\spawn.py",
line 225, in prepare
_fixup_main_from_path(data['init_main_from_path'])
File "C:\Users\newd\miniconda3\envs\py36-32bit\lib\multiprocessing\spawn.py",
line 277, in _fixup_main_from_path
run_name="mp_main")
File "C:\Users\newd\miniconda3\envs\py36-32bit\lib\runpy.py", line 263, in run
_path
pkg_name=pkg_name, script_name=fname)
File "C:\Users\newd\miniconda3\envs\py36-32bit\lib\runpy.py", line 96, in _run
_module_code
mod_name, mod_spec, pkg_name, script_name)
File "C:\Users\newd\miniconda3\envs\py36-32bit\lib\runpy.py", line 85, in _run
_code
exec(code, run_globals)
File "D:\projects\anacanda-voice-project\WaveRNN-master\WaveRNN-master\preproc
ess.py", line 87, in
pool = Pool(processes=n_workers)
File "C:\Users\newd\miniconda3\envs\py36-32bit\lib\multiprocessing\context.py"
, line 119, in Pool
context=self.get_context())
File "C:\Users\newd\miniconda3\envs\py36-32bit\lib\multiprocessing\pool.py", l
ine 174, in init
self._repopulate_pool()
File "C:\Users\newd\miniconda3\envs\py36-32bit\lib\multiprocessing\pool.py", l
ine 239, in _repopulate_pool
w.start()
File "C:\Users\newd\miniconda3\envs\py36-32bit\lib\multiprocessing\process.py"
, line 105, in start
self._popen = self._Popen(self)
File "C:\Users\newd\miniconda3\envs\py36-32bit\lib\multiprocessing\context.py"
, line 322, in _Popen
return Popen(process_obj)
File "C:\Users\newd\miniconda3\envs\py36-32bit\lib\multiprocessing\popen_spawn
_win32.py", line 33, in init
prep_data = spawn.get_preparation_data(process_obj._name)
File "C:\Users\newd\miniconda3\envs\py36-32bit\lib\multiprocessing\spawn.py",
line 143, in get_preparation_data
_check_not_importing_main()
File "C:\Users\newd\miniconda3\envs\py36-32bit\lib\multiprocessing\spawn.py",
line 136, in _check_not_importing_main
is not going to be frozen to produce an executable.''')
RuntimeError:
An attempt has been made to start a new process before the
current process has finished its bootstrapping phase.

    This probably means that you are not using fork to start your
    child processes and you have forgotten to use the proper idiom
    in the main module:

        if __name__ == '__main__':
            freeze_support()
            ...

    The "freeze_support()" line can be omitted if the program
    is not going to be frozen to produce an executable.

5 wav files found in "witch-wife_2010_librivox"

+-------------+-----------+--------+------------+-----------+
| Sample Rate | Bit Depth | Mu Law | Hop Length | CPU Usage |
+-------------+-----------+--------+------------+-----------+
| 22050 | 9 | True | 275 | 7/8 |
+-------------+-----------+--------+------------+-----------+

Traceback (most recent call last):
File "", line 1, in
File "C:\Users\newd\miniconda3\envs\py36-32bit\lib\multiprocessing\spawn.py",
line 105, in spawn_main
exitcode = _main(fd)
File "C:\Users\newd\miniconda3\envs\py36-32bit\lib\multiprocessing\spawn.py",
line 114, in _main
prepare(preparation_data)
File "C:\Users\newd\miniconda3\envs\py36-32bit\lib\multiprocessing\spawn.py",
line 225, in prepare
_fixup_main_from_path(data['init_main_from_path'])
File "C:\Users\newd\miniconda3\envs\py36-32bit\lib\multiprocessing\spawn.py",
line 277, in _fixup_main_from_path
run_name="mp_main")
File "C:\Users\newd\miniconda3\envs\py36-32bit\lib\runpy.py", line 263, in run
_path
pkg_name=pkg_name, script_name=fname)
File "C:\Users\newd\miniconda3\envs\py36-32bit\lib\runpy.py", line 96, in _run
_module_code
mod_name, mod_spec, pkg_name, script_name)
File "C:\Users\newd\miniconda3\envs\py36-32bit\lib\runpy.py", line 85, in _run
_code
exec(code, run_globals)
File "D:\projects\anacanda-voice-project\WaveRNN-master\WaveRNN-master\preproc
ess.py", line 87, in
pool = Pool(processes=n_workers)
File "C:\Users\newd\miniconda3\envs\py36-32bit\lib\multiprocessing\context.py"
, line 119, in Pool
context=self.get_context())
File "C:\Users\newd\miniconda3\envs\py36-32bit\lib\multiprocessing\pool.py", l
ine 174, in init
self._repopulate_pool()
File "C:\Users\newd\miniconda3\envs\py36-32bit\lib\multiprocessing\pool.py", l
ine 239, in _repopulate_pool
w.start()
File "C:\Users\newd\miniconda3\envs\py36-32bit\lib\multiprocessing\process.py"
, line 105, in start
self._popen = self._Popen(self)
File "C:\Users\newd\miniconda3\envs\py36-32bit\lib\multiprocessing\context.py"
, line 322, in _Popen
return Popen(process_obj)
File "C:\Users\newd\miniconda3\envs\py36-32bit\lib\multiprocessing\popen_spawn
_win32.py", line 33, in init
prep_data = spawn.get_preparation_data(process_obj._name)
File "C:\Users\newd\miniconda3\envs\py36-32bit\lib\multiprocessing\spawn.py",
line 143, in get_preparation_data
_check_not_importing_main()
File "C:\Users\newd\miniconda3\envs\py36-32bit\lib\multiprocessing\spawn.py",
line 136, in _check_not_importing_main
is not going to be frozen to produce an executable.''')
RuntimeError:
An attempt has been made to start a new process before the
current process has finished its bootstrapping phase.

    This probably means that you are not using fork to start your
    child processes and you have forgotten to use the proper idiom
    in the main module:

        if __name__ == '__main__':
            freeze_support()
            ...

    The "freeze_support()" line can be omitted if the program
    is not going to be frozen to produce an executable.

Traceback (most recent call last):
File "", line 1, in
File "C:\Users\newd\miniconda3\envs\py36-32bit\lib\multiprocessing\spawn.py",
line 105, in spawn_main
exitcode = _main(fd)
File "C:\Users\newd\miniconda3\envs\py36-32bit\lib\multiprocessing\spawn.py",
line 114, in _main
prepare(preparation_data)
File "C:\Users\newd\miniconda3\envs\py36-32bit\lib\multiprocessing\spawn.py",
line 225, in prepare
_fixup_main_from_path(data['init_main_from_path'])
File "C:\Users\newd\miniconda3\envs\py36-32bit\lib\multiprocessing\spawn.py",
line 277, in _fixup_main_from_path
run_name="mp_main")
File "C:\Users\newd\miniconda3\envs\py36-32bit\lib\runpy.py", line 263, in run
_path
pkg_name=pkg_name, script_name=fname)
File "C:\Users\newd\miniconda3\envs\py36-32bit\lib\runpy.py", line 96, in _run
_module_code
mod_name, mod_spec, pkg_name, script_name)
File "C:\Users\newd\miniconda3\envs\py36-32bit\lib\runpy.py", line 85, in _run
code
exec(code, run_globals)
File "D:\projects\anacanda-voice-project\WaveRNN-master\WaveRNN-master\preproc
ess.py", line 2, in
from utils.display import *
File "D:\projects\anacanda-voice-project\WaveRNN-master\WaveRNN-master\utils_
init
.py", line 6, in
import torch
File "C:\Users\newd\miniconda3\envs\py36-32bit\lib\site-packages\torch_init
_.py", line 117, in
raise err
OSError: [WinError 1455] The paging file is too small for this operation to comp
lete. Error loading "C:\Users\newd\miniconda3\envs\py36-32bit\lib\site-packages
torch\lib\caffe2_detectron_ops_gpu.dll" or one of its dependencies.

5 wav files found in "witch-wife_2010_librivox"

+-------------+-----------+--------+------------+-----------+
| Sample Rate | Bit Depth | Mu Law | Hop Length | CPU Usage |
+-------------+-----------+--------+------------+-----------+
| 22050 | 9 | True | 275 | 7/8 |
+-------------+-----------+--------+------------+-----------+

Traceback (most recent call last):
File "", line 1, in
File "C:\Users\newd\miniconda3\envs\py36-32bit\lib\multiprocessing\spawn.py",
line 105, in spawn_main
exitcode = _main(fd)
File "C:\Users\newd\miniconda3\envs\py36-32bit\lib\multiprocessing\spawn.py",
line 114, in _main
prepare(preparation_data)
File "C:\Users\newd\miniconda3\envs\py36-32bit\lib\multiprocessing\spawn.py",
line 225, in prepare
_fixup_main_from_path(data['init_main_from_path'])
File "C:\Users\newd\miniconda3\envs\py36-32bit\lib\multiprocessing\spawn.py",
line 277, in _fixup_main_from_path
run_name="mp_main")
File "C:\Users\newd\miniconda3\envs\py36-32bit\lib\runpy.py", line 263, in run
_path
pkg_name=pkg_name, script_name=fname)
File "C:\Users\newd\miniconda3\envs\py36-32bit\lib\runpy.py", line 96, in _run
_module_code
mod_name, mod_spec, pkg_name, script_name)
File "C:\Users\newd\miniconda3\envs\py36-32bit\lib\runpy.py", line 85, in _run
_code
exec(code, run_globals)
File "D:\projects\anacanda-voice-project\WaveRNN-master\WaveRNN-master\preproc
ess.py", line 87, in
pool = Pool(processes=n_workers)
File "C:\Users\newd\miniconda3\envs\py36-32bit\lib\multiprocessing\context.py"
, line 119, in Pool
context=self.get_context())
File "C:\Users\newd\miniconda3\envs\py36-32bit\lib\multiprocessing\pool.py", l
ine 174, in init
self._repopulate_pool()
File "C:\Users\newd\miniconda3\envs\py36-32bit\lib\multiprocessing\pool.py", l
ine 239, in _repopulate_pool
w.start()
File "C:\Users\newd\miniconda3\envs\py36-32bit\lib\multiprocessing\process.py"
, line 105, in start
self._popen = self._Popen(self)
File "C:\Users\newd\miniconda3\envs\py36-32bit\lib\multiprocessing\context.py"
, line 322, in _Popen
return Popen(process_obj)
File "C:\Users\newd\miniconda3\envs\py36-32bit\lib\multiprocessing\popen_spawn
_win32.py", line 33, in init
prep_data = spawn.get_preparation_data(process_obj._name)
File "C:\Users\newd\miniconda3\envs\py36-32bit\lib\multiprocessing\spawn.py",
line 143, in get_preparation_data
_check_not_importing_main()
File "C:\Users\newd\miniconda3\envs\py36-32bit\lib\multiprocessing\spawn.py",
line 136, in _check_not_importing_main
is not going to be frozen to produce an executable.''')
RuntimeError:
An attempt has been made to start a new process before the
current process has finished its bootstrapping phase.

    This probably means that you are not using fork to start your
    child processes and you have forgotten to use the proper idiom
    in the main module:

        if __name__ == '__main__':
            freeze_support()
            ...

    The "freeze_support()" line can be omitted if the program
    is not going to be frozen to produce an executable.

Traceback (most recent call last):
File "", line 1, in
File "C:\Users\newd\miniconda3\envs\py36-32bit\lib\multiprocessing\spawn.py",
line 99, in spawn_main
new_handle = reduction.steal_handle(parent_pid, pipe_handle)
File "C:\Users\newd\miniconda3\envs\py36-32bit\lib\multiprocessing\reduction.p
y", line 87, in steal_handle
_winapi.DUPLICATE_SAME_ACCESS | _winapi.DUPLICATE_CLOSE_SOURCE)
PermissionError: [WinError 5] Access is denied

setup: dual graphics card: nvidia geforce gtx 660 ti and quadro p400, python 3.6 32bit. windows 7
I've tied different version upto python 3.8.
successfully ran quickstart and produced wave files from sentences.txt

After when I fixed the indentation as suggested.
Got the error message when ran the following and the anaconda command prompt crashed:
python preprocess.py --path witch-wife_2010_librivox

i'm trying to train new voices, but was unsuccessful for over 2 weeks.

@Dmeerev
Copy link

Dmeerev commented May 6, 2022

Same issue on windows. On ubuntu 10.10 running perfectly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants