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

RuntimeError: An attempt has been made to start a new process before the current process has finished its bootstrapping phase. #13

Open
SaberSz opened this issue Jun 26, 2020 · 2 comments

Comments

@SaberSz
Copy link

SaberSz commented Jun 26, 2020

Hi,

I'm trying to run generate the dataset. I installed the requirements from the main repo.

I used to following command to execute the generate_data.py script.

python generate_data.py --filesize 10 --threads 10 --outpath "D:\Datasets\TIES\Generated Data" --imagespath "D:\Datasets\TIES\unlv_images" --ocrpath "D:\Datasets\TIES\unlv_xml_ocr" --tablepath "D:\Datasets\TIES\unlv_xml_gt" --visualizeimgs 1 --visualizebboxes 1

The below error is being generated:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\spawn.py", line 105, in spawn_main
    exitcode = _main(fd)
  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\spawn.py", line 114, in _main
Traceback (most recent call last):
    prepare(preparation_data)
  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\spawn.py", line 225, in prepare
  File "<string>", line 1, in <module>
    _fixup_main_from_path(data['init_main_from_path'])Traceback (most recent call last):
  File "<string>", line 1, in <module>

  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\spawn.py", line 105, in spawn_main
  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\spawn.py", line 105, in spawn_main
  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\spawn.py", line 277, in _fixup_main_from_path
Traceback (most recent call last):
    exitcode = _main(fd)
  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\spawn.py", line 114, in _main
  File "<string>", line 1, in <module>
    run_name="__mp_main__")
      File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\spawn.py", line 105, in spawn_main
    prepare(preparation_data)
  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\spawn.py", line 225, in prepare
    exitcode = _main(fd)
  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\spawn.py", line 114, in _main
    _fixup_main_from_path(data['init_main_from_path'])
  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\spawn.py", line 277, in _fixup_main_from_path
exitcode = _main(fd)
  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\spawn.py", line 114, in _main
  File "C:\Users\SaberSz\Anaconda3\lib\runpy.py", line 263, in run_path
        prepare(preparation_data)
  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\spawn.py", line 225, in prepare
    prepare(preparation_data)    run_name="__mp_main__")
  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\spawn.py", line 225, in prepare

pkg_name=pkg_name, script_name=fname)  File "C:\Users\SaberSz\Anaconda3\lib\runpy.py", line 263, in run_path

  File "C:\Users\SaberSz\Anaconda3\lib\runpy.py", line 96, in _run_module_code
    pkg_name=pkg_name, script_name=fname)
            _fixup_main_from_path(data['init_main_from_path'])_fixup_main_from_path(data['init_main_from_path'])mod_name, mod_spec, pkg_name, script_name)
  File "C:\Users\SaberSz\Anaconda3\lib\runpy.py", line 85, in _run_code

  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\spawn.py", line 277, in _fixup_main_from_path

  File "C:\Users\SaberSz\Anaconda3\lib\runpy.py", line 96, in _run_module_code
        run_name="__mp_main__")
  File "C:\Users\SaberSz\Anaconda3\lib\runpy.py", line 263, in run_path
  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\spawn.py", line 277, in _fixup_main_from_path
exec(code, run_globals)    pkg_name=pkg_name, script_name=fname)
  File "D:\Datasets\TIES\TIES_DataGeneration-master\generate_data.py", line 32, in <module>
mod_name, mod_spec, pkg_name, script_name)
  File "C:\Users\SaberSz\Anaconda3\lib\runpy.py", line 85, in _run_code

  File "C:\Users\SaberSz\Anaconda3\lib\runpy.py", line 96, in _run_module_code
        run_name="__mp_main__")    exec(code, run_globals)
  File "C:\Users\SaberSz\Anaconda3\lib\runpy.py", line 263, in run_path

  File "D:\Datasets\TIES\TIES_DataGeneration-master\generate_data.py", line 32, in <module>
t.write_to_tf(args.threads)
  File "D:\Datasets\TIES\TIES_DataGeneration-master\TFGeneration\GenerateTFRecord.py", line 328, in write_to_tf
    t.write_to_tf(args.threads)
    mod_name, mod_spec, pkg_name, script_name)
  File "D:\Datasets\TIES\TIES_DataGeneration-master\TFGeneration\GenerateTFRecord.py", line 328, in write_to_tf
        pkg_name=pkg_name, script_name=fname)  File "C:\Users\SaberSz\Anaconda3\lib\runpy.py", line 85, in _run_code
proc.start()
proc.start()
  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\process.py", line 105, in start

  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\process.py", line 105, in start
  File "C:\Users\SaberSz\Anaconda3\lib\runpy.py", line 96, in _run_module_code
    self._popen = self._Popen(self)
      File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\context.py", line 223, in _Popen
self._popen = self._Popen(self)
          File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\context.py", line 223, in _Popen
mod_name, mod_spec, pkg_name, script_name)exec(code, run_globals)    return _default_context.get_context().Process._Popen(process_obj)

  File "C:\Users\SaberSz\Anaconda3\lib\runpy.py", line 85, in _run_code
    return _default_context.get_context().Process._Popen(process_obj)
  File "D:\Datasets\TIES\TIES_DataGeneration-master\generate_data.py", line 32, in <module>
      File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\context.py", line 322, in _Popen

      File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\context.py", line 322, in _Popen
t.write_to_tf(args.threads)exec(code, run_globals)

  File "D:\Datasets\TIES\TIES_DataGeneration-master\TFGeneration\GenerateTFRecord.py", line 328, in write_to_tf
return Popen(process_obj)
  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\popen_spawn_win32.py", line 33, in __init__
  File "D:\Datasets\TIES\TIES_DataGeneration-master\generate_data.py", line 32, in <module>
    proc.start()    t.write_to_tf(args.threads)    return Popen(process_obj)


    prep_data = spawn.get_preparation_data(process_obj._name)
  File "D:\Datasets\TIES\TIES_DataGeneration-master\TFGeneration\GenerateTFRecord.py", line 328, in write_to_tf
  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\process.py", line 105, in start
    proc.start()
  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\process.py", line 105, in start
    self._popen = self._Popen(self)
  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\popen_spawn_win32.py", line 33, in __init__
  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\spawn.py", line 143, in get_preparation_data
  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\context.py", line 223, in _Popen
        prep_data = spawn.get_preparation_data(process_obj._name)self._popen = self._Popen(self)
  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\spawn.py", line 143, in get_preparation_data
    _check_not_importing_main()
  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\spawn.py", line 136, in _check_not_importing_main
    return _default_context.get_context().Process._Popen(process_obj)
  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\context.py", line 223, in _Popen

_check_not_importing_main()Traceback (most recent call last):
is not going to be frozen to produce an executable.''')

  File "<string>", line 1, in <module>
  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\context.py", line 322, in _Popen
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.      File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\spawn.py", line 136, in _check_not_importing_main
  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\spawn.py", line 105, in spawn_main
Traceback (most recent call last):
      File "<string>", line 1, in <module>
return _default_context.get_context().Process._Popen(process_obj)
  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\context.py", line 322, in _Popen

    is not going to be frozen to produce an executable.''')  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\spawn.py", line 105, in spawn_main
    return Popen(process_obj)
    return Popen(process_obj)
exitcode = _main(fd)  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\popen_spawn_win32.py", line 33, in __init__
Traceback (most recent call last):
  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\popen_spawn_win32.py", line 33, in __init__
  File "<string>", line 1, in <module>


              File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\spawn.py", line 114, in _main
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.
prep_data = spawn.get_preparation_data(process_obj._name)exitcode = _main(fd)  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\spawn.py", line 105, in spawn_main
    prep_data = spawn.get_preparation_data(process_obj._name)

prepare(preparation_data)  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\spawn.py", line 114, in _main
  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\spawn.py", line 143, in get_preparation_data


Traceback (most recent call last):
      File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\spawn.py", line 143, in get_preparation_data
  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\spawn.py", line 225, in prepare
    _check_not_importing_main()  File "<string>", line 1, in <module>
exitcode = _main(fd)
  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\spawn.py", line 114, in _main
          File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\spawn.py", line 105, in spawn_main

    _fixup_main_from_path(data['init_main_from_path'])_check_not_importing_main()  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\spawn.py", line 136, in _check_not_importing_main
prepare(preparation_data)
  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\spawn.py", line 277, in _fixup_main_from_path

  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\spawn.py", line 225, in prepare

  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\spawn.py", line 136, in _check_not_importing_main
prepare(preparation_data)    exitcode = _main(fd)is not going to be frozen to produce an executable.''')
    run_name="__mp_main__")
  File "C:\Users\SaberSz\Anaconda3\lib\runpy.py", line 263, in run_path
  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\spawn.py", line 225, in prepare

  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\spawn.py", line 114, in _main
    _fixup_main_from_path(data['init_main_from_path'])
    RuntimeErroris not going to be frozen to produce an executable.''')
  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\spawn.py", line 277, in _fixup_main_from_path
    prepare(preparation_data)
    pkg_name=pkg_name, script_name=fname)
  File "C:\Users\SaberSz\Anaconda3\lib\runpy.py", line 96, in _run_module_code
    run_name="__mp_main__")

RuntimeError  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\spawn.py", line 225, in prepare
:
        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.: _fixup_main_from_path(data['init_main_from_path'])      File "C:\Users\SaberSz\Anaconda3\lib\runpy.py", line 263, in run_path
    _fixup_main_from_path(data['init_main_from_path'])
        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.
mod_name, mod_spec, pkg_name, script_name)  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\spawn.py", line 277, in _fixup_main_from_path

  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\spawn.py", line 277, in _fixup_main_from_path

    run_name="__mp_main__")


        pkg_name=pkg_name, script_name=fname)
run_name="__mp_main__")
  File "C:\Users\SaberSz\Anaconda3\lib\runpy.py", line 263, in run_path
  File "C:\Users\SaberSz\Anaconda3\lib\runpy.py", line 96, in _run_module_code
  File "C:\Users\SaberSz\Anaconda3\lib\runpy.py", line 263, in run_path
  File "C:\Users\SaberSz\Anaconda3\lib\runpy.py", line 85, in _run_code
    pkg_name=pkg_name, script_name=fname)
  File "C:\Users\SaberSz\Anaconda3\lib\runpy.py", line 96, in _run_module_code
    pkg_name=pkg_name, script_name=fname)
  File "C:\Users\SaberSz\Anaconda3\lib\runpy.py", line 96, in _run_module_code
    mod_name, mod_spec, pkg_name, script_name)
  File "C:\Users\SaberSz\Anaconda3\lib\runpy.py", line 85, in _run_code
    mod_name, mod_spec, pkg_name, script_name)    mod_name, mod_spec, pkg_name, script_name)
Traceback (most recent call last):

  File "C:\Users\SaberSz\Anaconda3\lib\runpy.py", line 85, in _run_code
  File "C:\Users\SaberSz\Anaconda3\lib\runpy.py", line 85, in _run_code
      File "<string>", line 1, in <module>
    exec(code, run_globals)        exec(code, run_globals)
exec(code, run_globals)exec(code, run_globals)  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\spawn.py", line 105, in spawn_main

  File "D:\Datasets\TIES\TIES_DataGeneration-master\generate_data.py", line 32, in <module>

  File "D:\Datasets\TIES\TIES_DataGeneration-master\generate_data.py", line 32, in <module>
  File "D:\Datasets\TIES\TIES_DataGeneration-master\generate_data.py", line 32, in <module>

exitcode = _main(fd)t.write_to_tf(args.threads)      File "D:\Datasets\TIES\TIES_DataGeneration-master\generate_data.py", line 32, in <module>
    t.write_to_tf(args.threads)
t.write_to_tf(args.threads)
  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\spawn.py", line 114, in _main
    t.write_to_tf(args.threads)

  File "D:\Datasets\TIES\TIES_DataGeneration-master\TFGeneration\GenerateTFRecord.py", line 328, in write_to_tf
  File "D:\Datasets\TIES\TIES_DataGeneration-master\TFGeneration\GenerateTFRecord.py", line 328, in write_to_tf
  File "D:\Datasets\TIES\TIES_DataGeneration-master\TFGeneration\GenerateTFRecord.py", line 328, in write_to_tf

      File "D:\Datasets\TIES\TIES_DataGeneration-master\TFGeneration\GenerateTFRecord.py", line 328, in write_to_tf
prepare(preparation_data)    proc.start()
    proc.start()  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\spawn.py", line 225, in prepare
proc.start()
  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\process.py", line 105, in start

  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\process.py", line 105, in start
proc.start()
  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\process.py", line 105, in start
    self._popen = self._Popen(self)
  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\context.py", line 223, in _Popen
    self._popen = self._Popen(self)
  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\context.py", line 223, in _Popen

    _fixup_main_from_path(data['init_main_from_path'])
  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\spawn.py", line 277, in _fixup_main_from_path
    return _default_context.get_context().Process._Popen(process_obj)
  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\context.py", line 322, in _Popen
    self._popen = self._Popen(self)
  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\context.py", line 223, in _Popen
        run_name="__mp_main__")
  File "C:\Users\SaberSz\Anaconda3\lib\runpy.py", line 263, in run_path
    return _default_context.get_context().Process._Popen(process_obj)return Popen(process_obj)
  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\popen_spawn_win32.py", line 33, in __init__

  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\context.py", line 322, in _Popen
      File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\process.py", line 105, in start
    pkg_name=pkg_name, script_name=fname)
      File "C:\Users\SaberSz\Anaconda3\lib\runpy.py", line 96, in _run_module_code
return _default_context.get_context().Process._Popen(process_obj)return Popen(process_obj)        prep_data = spawn.get_preparation_data(process_obj._name)
  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\spawn.py", line 143, in get_preparation_data
self._popen = self._Popen(self)

  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\context.py", line 322, in _Popen
  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\context.py", line 223, in _Popen

                return Popen(process_obj)
_check_not_importing_main()
mod_name, mod_spec, pkg_name, script_name)return _default_context.get_context().Process._Popen(process_obj)  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\popen_spawn_win32.py", line 33, in __init__
  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\popen_spawn_win32.py", line 33, in __init__
  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\spawn.py", line 136, in _check_not_importing_main

  File "C:\Users\SaberSz\Anaconda3\lib\runpy.py", line 85, in _run_code

  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\context.py", line 322, in _Popen
prep_data = spawn.get_preparation_data(process_obj._name)
  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\spawn.py", line 143, in get_preparation_data
prep_data = spawn.get_preparation_data(process_obj._name)
  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\spawn.py", line 143, in get_preparation_data
    return Popen(process_obj)
  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\popen_spawn_win32.py", line 33, in __init__
    exec(code, run_globals)
  File "D:\Datasets\TIES\TIES_DataGeneration-master\generate_data.py", line 32, in <module>
    _check_not_importing_main()is not going to be frozen to produce an executable.''')_check_not_importing_main()prep_data = spawn.get_preparation_data(process_obj._name)

RuntimeError:
  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\spawn.py", line 136, in _check_not_importing_main

  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\spawn.py", line 136, in _check_not_importing_main

        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.  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\spawn.py", line 143, in get_preparation_data
        t.write_to_tf(args.threads)is not going to be frozen to produce an executable.''')

  File "D:\Datasets\TIES\TIES_DataGeneration-master\TFGeneration\GenerateTFRecord.py", line 328, in write_to_tf
    proc.start()
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.      File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\process.py", line 105, in start

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._check_not_importing_main()

    self._popen = self._Popen(self)
  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\context.py", line 223, in _Popen

  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\spawn.py", line 136, in _check_not_importing_main
    return _default_context.get_context().Process._Popen(process_obj)
  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\context.py", line 322, in _Popen
    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.
    return Popen(process_obj)
  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\popen_spawn_win32.py", line 33, in __init__
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\spawn.py", line 105, in spawn_main
    prep_data = spawn.get_preparation_data(process_obj._name)
  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\spawn.py", line 143, in get_preparation_data
    exitcode = _main(fd)
  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\spawn.py", line 114, in _main
    _check_not_importing_main()
  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\spawn.py", line 136, in _check_not_importing_main
    prepare(preparation_data)
  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\spawn.py", line 225, in prepare
    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.
    _fixup_main_from_path(data['init_main_from_path'])
  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\spawn.py", line 277, in _fixup_main_from_path
    run_name="__mp_main__")
  File "C:\Users\SaberSz\Anaconda3\lib\runpy.py", line 263, in run_path
    pkg_name=pkg_name, script_name=fname)
  File "C:\Users\SaberSz\Anaconda3\lib\runpy.py", line 96, in _run_module_code
    mod_name, mod_spec, pkg_name, script_name)
  File "C:\Users\SaberSz\Anaconda3\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "D:\Datasets\TIES\TIES_DataGeneration-master\generate_data.py", line 32, in <module>
    t.write_to_tf(args.threads)
  File "D:\Datasets\TIES\TIES_DataGeneration-master\TFGeneration\GenerateTFRecord.py", line 328, in write_to_tf
    proc.start()
    self._popen = self._Popen(self)
  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\context.py", line 223, in _Popen
    return _default_context.get_context().Process._Popen(process_obj)
  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\context.py", line 322, in _Popen
    return Popen(process_obj)
  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\popen_spawn_win32.py", line 33, in __init__
    prep_data = spawn.get_preparation_data(process_obj._name)
  File "C:\Users\SaberSz\Anaconda3\lib\multiprocessing\spawn.py", line 143, in get_preparation_data
    _check_not_importing_main()
  File "C:\Users\SaberSz\Anaconda3\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.
9.930928707122803
@linhuaiyi
Copy link

You may run scrip under windows os. You can move all code into if name == 'main':
it may solve this problem. @SaberSz

@EmperorKaiser
Copy link

You may run scrip under windows os. You can move all code into if name == 'main':
it may solve this problem. @SaberSz

it works for me on my win 8.1 os, thanks

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