yulqen / bcompiler-engine

MOVED: A Python library to alleviate the pain of using Excel spreadsheets to collect data from your stakeholders.
https://git.sr.ht/~yulqen/bcompiler-engine
MIT License
4 stars 1 forks source link

BrokenProcessPool exception when running PyOxidizer build of bcompiler in Windows 10 #9

Closed yulqen closed 4 years ago

yulqen commented 5 years ago

I have successfully built an exe file using PyOxidizer (great!). However, when running a command which creates a multiprocessing pool, I get

C:\Users\lemon\code\rust\bcompiler\build\apps\bcompiler\x86_64-pc-windows-msvc\debug>bcompiler.exe import templates -m
Hello from bcompiler 2.0!
Checking datamap file C:\Users\lemon\Documents\bcompiler\input\datamap.csv
C:\Users\lemon\Documents\bcompiler\input\datamap.csv checked ok
Usage: bcompiler.exe [OPTIONS] COMMAND [ARGS]...
Try "bcompiler.exe --help" for help.

Error: no such option: -B
Usage: bcompiler.exe [OPTIONS] COMMAND [ARGS]...
Try "bcompiler.exe --help" for help.

Usage: bcompiler.exe [OPTIONS] COMMAND [ARGS]...
Try "bcompiler.exe --help" for help.

Error: no such option: -B
Error: no such option: -B
Usage: bcompiler.exe [OPTIONS] COMMAND [ARGS]...
Try "bcompiler.exe --help" for help.

Error: no such option: -B
Usage: bcompiler.exe [OPTIONS] COMMAND [ARGS]...
Try "bcompiler.exe --help" for help.

Error: no such option: -B
Usage: bcompiler.exe [OPTIONS] COMMAND [ARGS]...
Try "bcompiler.exe --help" for help.

Usage: bcompiler.exe [OPTIONS] COMMAND [ARGS]...
Try "bcompiler.exe --help" for help.

Error: no such option: -B
Error: no such option: -B
Usage: bcompiler.exe [OPTIONS] COMMAND [ARGS]...
Try "bcompiler.exe --help" for help.

Error: no such option: -B
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "click.core", line 764, in __call__
  File "click.core", line 717, in main
  File "click.core", line 1137, in invoke
  File "click.core", line 1137, in invoke
  File "click.core", line 956, in invoke
  File "click.core", line 555, in invoke
  File "bcompiler.main", line 79, in templates
  File "engine.adapters.cli", line 37, in import_and_create_master
  File "engine.use_cases.parsing", line 181, in execute
  File "engine.use_cases.parsing", line 138, in execute
  File "engine.use_cases.parsing", line 128, in _get_datamap_and_template_data
  File "engine.use_cases.parsing", line 77, in execute
  File "engine.repository.templates", line 40, in list_as_json
  File "engine.use_cases.parsing", line 368, in extract_from_multiple_xlsx_files
  File "concurrent.futures.process", line 483, in _chain_from_iterable_of_lists
  File "concurrent.futures._base", line 598, in result_iterator
  File "concurrent.futures._base", line 435, in result
  File "concurrent.futures._base", line 384, in __get_result
concurrent.futures.process.BrokenProcessPool: A process in the process pool was terminated abruptly while the future was running or pending.

This post suggests the code needs to be guarded in an if __name__ == statement, but does it? pip installed version on Windows 10 works without any issue.

Opened at issue at https://github.com/indygreg/PyOxidizer/issues/111.

yulqen commented 4 years ago

Not pursuing this issue at this time as using Pyinstaller.