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

Massive Error - Multiprocessing RunTime Error #68

Open
teamcharliegithub opened this issue Aug 22, 2022 · 1 comment
Open

Massive Error - Multiprocessing RunTime Error #68

teamcharliegithub opened this issue Aug 22, 2022 · 1 comment

Comments

@teamcharliegithub
Copy link

teamcharliegithub commented Aug 22, 2022

I recently started working with a fresh install of reverse-geocoder, but every time I attempt to run a simple search of coordinates, it generates a massive traceback in console. It seems the error repeats several times before 'finishing' - by which I mean, the console spits out the location at the top of the location data file.
I'm utilizing Python 3.10 in Spyder 5.2.2, all within Anaconda Navigator 2.2.0.
My versions of scipy and numpy are 1.9.0 and 1.2.3.1, respectively.

I appreciate any and all help or advice. Thank you in advance!

[Loading formatted geocoded file...

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\spawn.py", line 116, in spawn_main
    exitcode = _main(fd, parent_sentinel)
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\spawn.py", line 125, in _main
    prepare(preparation_data)
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\spawn.py", line 236, in prepare
    _fixup_main_from_path(data['init_main_from_path'])
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\spawn.py", line 287, in _fixup_main_from_path
    main_content = runpy.run_path(main_path,
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\runpy.py", line 269, in run_path
    return _run_module_code(code, init_globals, run_name,
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\runpy.py", line 96, in _run_module_code
    _run_code(code, mod_globals, init_globals,
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Users\USER1\Documents\Python Scripts\apis\tracker.py", line 102, in <module>
    x = rg.search((lon, lat))
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\site-packages\reverse_geocoder\__init__.py", line 293, in search
    return _rg.query(geo_coords)
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\site-packages\reverse_geocoder\__init__.py", line 127, in query
    _, indices = self.tree.pquery(coordinates, k=1)
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\site-packages\reverse_geocoder\cKDTree_MP.py", line 97, in pquery
    for p in pool: p.start()
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\process.py", line 121, in start
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\spawn.py", line 116, in spawn_main
    self._popen = self._Popen(self)
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\context.py", line 224, in _Popen
    exitcode = _main(fd, parent_sentinel)
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\spawn.py", line 125, in _main
    return _default_context.get_context().Process._Popen(process_obj)
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\context.py", line 327, in _Popen
    prepare(preparation_data)
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\spawn.py", line 236, in prepare
    return Popen(process_obj)
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\popen_spawn_win32.py", line 45, in __init__
    _fixup_main_from_path(data['init_main_from_path'])
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\spawn.py", line 287, in _fixup_main_from_path
    prep_data = spawn.get_preparation_data(process_obj._name)
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\spawn.py", line 154, in get_preparation_data
    main_content = runpy.run_path(main_path,
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\runpy.py", line 269, in run_path
    _check_not_importing_main()
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\spawn.py", line 134, in _check_not_importing_main
    return _run_module_code(code, init_globals, run_name,
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\runpy.py", line 96, in _run_module_code
    raise RuntimeError('''
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.
    _run_code(code, mod_globals, init_globals,
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Users\USER1\Documents\Python Scripts\apis\tracker.py", line 102, in <module>
    x = rg.search((lon, lat))
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\site-packages\reverse_geocoder\__init__.py", line 293, in search
    return _rg.query(geo_coords)
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\site-packages\reverse_geocoder\__init__.py", line 127, in query
    _, indices = self.tree.pquery(coordinates, k=1)
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\site-packages\reverse_geocoder\cKDTree_MP.py", line 97, in pquery
    for p in pool: p.start()
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\process.py", line 121, in start
    self._popen = self._Popen(self)
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\context.py", line 224, in _Popen
    return _default_context.get_context().Process._Popen(process_obj)
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\context.py", line 327, in _Popen
    return Popen(process_obj)
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\popen_spawn_win32.py", line 45, in __init__
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\spawn.py", line 116, in spawn_main
    prep_data = spawn.get_preparation_data(process_obj._name)
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\spawn.py", line 154, in get_preparation_data
    _check_not_importing_main()
    exitcode = _main(fd, parent_sentinel)
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\spawn.py", line 134, in _check_not_importing_main
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\spawn.py", line 125, in _main
    raise RuntimeError('''
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.
    prepare(preparation_data)
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\spawn.py", line 236, in prepare
    _fixup_main_from_path(data['init_main_from_path'])
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\spawn.py", line 287, in _fixup_main_from_path
    main_content = runpy.run_path(main_path,
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\runpy.py", line 269, in run_path
    return _run_module_code(code, init_globals, run_name,
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\runpy.py", line 96, in _run_module_code
    _run_code(code, mod_globals, init_globals,
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Users\USER1\Documents\Python Scripts\apis\tracker.py", line 102, in <module>
    x = rg.search((lon, lat))
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\site-packages\reverse_geocoder\__init__.py", line 293, in search
    return _rg.query(geo_coords)
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\site-packages\reverse_geocoder\__init__.py", line 127, in query
    _, indices = self.tree.pquery(coordinates, k=1)
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\site-packages\reverse_geocoder\cKDTree_MP.py", line 97, in pquery
    for p in pool: p.start()
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\process.py", line 121, in start
    self._popen = self._Popen(self)
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\context.py", line 224, in _Popen
    return _default_context.get_context().Process._Popen(process_obj)
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\context.py", line 327, in _Popen
    return Popen(process_obj)
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\popen_spawn_win32.py", line 45, in __init__
    prep_data = spawn.get_preparation_data(process_obj._name)
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\spawn.py", line 154, in get_preparation_data
    _check_not_importing_main()
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\spawn.py", line 134, 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.

        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 "<string>", line 1, in <module>
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\spawn.py", line 116, in spawn_main
    exitcode = _main(fd, parent_sentinel)
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\spawn.py", line 125, in _main
    prepare(preparation_data)
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\spawn.py", line 236, in prepare
    _fixup_main_from_path(data['init_main_from_path'])
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\spawn.py", line 287, in _fixup_main_from_path
    main_content = runpy.run_path(main_path,
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\runpy.py", line 269, in run_path
    return _run_module_code(code, init_globals, run_name,
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\runpy.py", line 96, in _run_module_code
    _run_code(code, mod_globals, init_globals,
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Users\USER1\Documents\Python Scripts\apis\tracker.py", line 102, in <module>
    x = rg.search((lon, lat))
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\site-packages\reverse_geocoder\__init__.py", line 293, in search
    return _rg.query(geo_coords)
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\site-packages\reverse_geocoder\__init__.py", line 127, in query
    _, indices = self.tree.pquery(coordinates, k=1)
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\site-packages\reverse_geocoder\cKDTree_MP.py", line 97, in pquery
    for p in pool: p.start()
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\process.py", line 121, in start
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\spawn.py", line 116, in spawn_main
    self._popen = self._Popen(self)
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\context.py", line 224, in _Popen
    exitcode = _main(fd, parent_sentinel)
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\spawn.py", line 125, in _main
    return _default_context.get_context().Process._Popen(process_obj)
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\context.py", line 327, in _Popen
    prepare(preparation_data)
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\spawn.py", line 236, in prepare
    return Popen(process_obj)
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\popen_spawn_win32.py", line 45, in __init__
    _fixup_main_from_path(data['init_main_from_path'])
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\spawn.py", line 287, in _fixup_main_from_path
    prep_data = spawn.get_preparation_data(process_obj._name)
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\spawn.py", line 154, in get_preparation_data
    main_content = runpy.run_path(main_path,
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\runpy.py", line 269, in run_path
    return _run_module_code(code, init_globals, run_name,
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\runpy.py", line 96, in _run_module_code
    _check_not_importing_main()
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\spawn.py", line 134, in _check_not_importing_main
    _run_code(code, mod_globals, init_globals,
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\runpy.py", line 86, in _run_code
    raise RuntimeError('''
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.
    exec(code, run_globals)
  File "C:\Users\USER1\Documents\Python Scripts\apis\tracker.py", line 102, in <module>
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\spawn.py", line 116, in spawn_main
    x = rg.search((lon, lat))
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\site-packages\reverse_geocoder\__init__.py", line 293, in search
    exitcode = _main(fd, parent_sentinel)
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\spawn.py", line 125, in _main
    return _rg.query(geo_coords)
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\site-packages\reverse_geocoder\__init__.py", line 127, in query
    prepare(preparation_data)
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\spawn.py", line 236, in prepare
    _, indices = self.tree.pquery(coordinates, k=1)
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\site-packages\reverse_geocoder\cKDTree_MP.py", line 97, in pquery
    _fixup_main_from_path(data['init_main_from_path'])
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\spawn.py", line 287, in _fixup_main_from_path
    for p in pool: p.start()
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\process.py", line 121, in start
    self._popen = self._Popen(self)
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\context.py", line 224, in _Popen
    main_content = runpy.run_path(main_path,
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\runpy.py", line 269, in run_path
    return _run_module_code(code, init_globals, run_name,
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\runpy.py", line 96, in _run_module_code
    return _default_context.get_context().Process._Popen(process_obj)
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\context.py", line 327, in _Popen
    _run_code(code, mod_globals, init_globals,
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\runpy.py", line 86, in _run_code
    return Popen(process_obj)
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\popen_spawn_win32.py", line 45, in __init__
    prep_data = spawn.get_preparation_data(process_obj._name)
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\spawn.py", line 154, in get_preparation_data
    exec(code, run_globals)
  File "C:\Users\USER1\Documents\Python Scripts\apis\tracker.py", line 102, in <module>
    x = rg.search((lon, lat))
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\site-packages\reverse_geocoder\__init__.py", line 293, in search
    _check_not_importing_main()
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\spawn.py", line 134, in _check_not_importing_main
    return _rg.query(geo_coords)
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\site-packages\reverse_geocoder\__init__.py", line 127, in query
    _, indices = self.tree.pquery(coordinates, k=1)
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\site-packages\reverse_geocoder\cKDTree_MP.py", line 97, in pquery
    raise RuntimeError('''
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 "<string>", line 1, in <module>
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\spawn.py", line 116, in spawn_main
    for p in pool: p.start()
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\process.py", line 121, in start
    exitcode = _main(fd, parent_sentinel)
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\spawn.py", line 125, in _main
    self._popen = self._Popen(self)
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\context.py", line 224, in _Popen
    prepare(preparation_data)
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\spawn.py", line 236, in prepare
    return _default_context.get_context().Process._Popen(process_obj)
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\context.py", line 327, in _Popen
    _fixup_main_from_path(data['init_main_from_path'])
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\spawn.py", line 287, in _fixup_main_from_path
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\spawn.py", line 116, in spawn_main
    return Popen(process_obj)
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\popen_spawn_win32.py", line 45, in __init__
    main_content = runpy.run_path(main_path,
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\runpy.py", line 269, in run_path
    exitcode = _main(fd, parent_sentinel)
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\spawn.py", line 125, in _main
    prep_data = spawn.get_preparation_data(process_obj._name)
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\spawn.py", line 154, in get_preparation_data
    return _run_module_code(code, init_globals, run_name,
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\runpy.py", line 96, in _run_module_code
    prepare(preparation_data)
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\spawn.py", line 236, in prepare
    _check_not_importing_main()
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\spawn.py", line 134, in _check_not_importing_main
    _run_code(code, mod_globals, init_globals,
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\runpy.py", line 86, in _run_code
    _fixup_main_from_path(data['init_main_from_path'])
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\spawn.py", line 287, in _fixup_main_from_path
    raise RuntimeError('''
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.
    exec(code, run_globals)
  File "C:\Users\USER1\Documents\Python Scripts\apis\tracker.py", line 102, in <module>
    main_content = runpy.run_path(main_path,
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\runpy.py", line 269, in run_path
    x = rg.search((lon, lat))
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\site-packages\reverse_geocoder\__init__.py", line 293, in search
    return _run_module_code(code, init_globals, run_name,
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\runpy.py", line 96, in _run_module_code
    return _rg.query(geo_coords)
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\site-packages\reverse_geocoder\__init__.py", line 127, in query
    _run_code(code, mod_globals, init_globals,
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\runpy.py", line 86, in _run_code
    _, indices = self.tree.pquery(coordinates, k=1)
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\site-packages\reverse_geocoder\cKDTree_MP.py", line 97, in pquery
    exec(code, run_globals)
  File "C:\Users\USER1\Documents\Python Scripts\apis\tracker.py", line 102, in <module>
    for p in pool: p.start()
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\process.py", line 121, in start
    x = rg.search((lon, lat))
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\site-packages\reverse_geocoder\__init__.py", line 293, in search
    self._popen = self._Popen(self)
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\context.py", line 224, in _Popen
    return _rg.query(geo_coords)
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\site-packages\reverse_geocoder\__init__.py", line 127, in query
    return _default_context.get_context().Process._Popen(process_obj)
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\context.py", line 327, in _Popen
    _, indices = self.tree.pquery(coordinates, k=1)
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\site-packages\reverse_geocoder\cKDTree_MP.py", line 97, in pquery
    return Popen(process_obj)
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\popen_spawn_win32.py", line 45, in __init__
    for p in pool: p.start()
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\process.py", line 121, in start
    prep_data = spawn.get_preparation_data(process_obj._name)
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\spawn.py", line 154, in get_preparation_data
    self._popen = self._Popen(self)
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\context.py", line 224, in _Popen
    _check_not_importing_main()
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\spawn.py", line 134, in _check_not_importing_main
    return _default_context.get_context().Process._Popen(process_obj)
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\context.py", line 327, in _Popen
    raise RuntimeError('''
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\USER1\anaconda3\envs\bravo\lib\multiprocessing\popen_spawn_win32.py", line 45, in __init__
    prep_data = spawn.get_preparation_data(process_obj._name)
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\spawn.py", line 154, in get_preparation_data
    _check_not_importing_main()
  File "C:\Users\USER1\anaconda3\envs\bravo\lib\multiprocessing\spawn.py", line 134, 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.

        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.

Figure(1520x820)
Loading formatted geocoded file...
Figure(1520x820)
Loading formatted geocoded file...
Figure(1520x820)
Loading formatted geocoded file...
Figure(1520x820)
Loading formatted geocoded file...
Figure(1520x820)
Loading formatted geocoded file...
Figure(1520x820)
Loading formatted geocoded file...
Figure(1520x820)
Loading formatted geocoded file...
Figure(1520x820)
Loading formatted geocoded file...
[{'lat': '42.57952', 'lon': '1.65362', 'name': 'El Tarter', 'admin1': 'Canillo', 'admin2': '', 'cc': 'AD'}]]
@al-yakubovich
Copy link

It is windows multiprocessing error. Add if __name__ == '__main__': as first line for the whole code (even including imports).

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

2 participants