nvdv / vprof

Visual profiler for Python
BSD 2-Clause "Simplified" License
3.95k stars 154 forks source link

Cannot run example permutations on Windows 10 using cygwin #65

Closed Tjorriemorrie closed 7 years ago

Tjorriemorrie commented 7 years ago
Description

Error running example.

How to reproduce

$ vprof -c cmh permutations.py

Actual results
Running MemoryProfiler...
[('A', 'B'), ('A', 'C'), ('A', 'D'), ('A', 'E'), ('A', 'F'), ('A', 'G'), ('A', 'E'), ('A', 'D'), ('B', 'A'), ('B', 'C'), ('B', 'D'), ('B', 'E'), ('B', 'F'), ('B', 'G'), ('B', 'E'), ('B', 'D'), ('C', 'A'), ('C', 'B'), ('C', 'D'), ('C', 'E'), ('C', 'F'), ('C', 'G'), ('C', 'E'), ('C', 'D'), ('D', 'A'), ('D', 'B'), ('D', 'C'), ('D', 'E'), ('D', 'F'), ('D', 'G'), ('D', 'E'), ('D', 'D'), ('E', 'A'), ('E', 'B'), ('E', 'C'), ('E', 'D'), ('E', 'F'), ('E', 'G'), ('E', 'E'), ('E', 'D'), ('F', 'A'), ('F', 'B'), ('F', 'C'), ('F', 'D'), ('F', 'E'), ('F', 'G'), ('F', 'E'), ('F', 'D'), ('G', 'A'), ('G', 'B'), ('G', 'C'), ('G', 'D'), ('G', 'E'), ('G', 'F'), ('G', 'E'), ('G', 'D'), ('E', 'A'), ('E', 'B'), ('E', 'C'), ('E', 'D'), ('E', 'E'), ('E', 'F'), ('E', 'G'), ('E', 'D'), ('D', 'A'), ('D', 'B'), ('D', 'C'), ('D', 'D'), ('D', 'E'), ('D', 'F'), ('D', 'G'), ('D', 'E')]
Running FlameGraphProfiler...
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "c:\python27\lib\multiprocessing\forking.py", line 380, in main
    prepare(preparation_data)
  File "c:\python27\lib\multiprocessing\forking.py", line 488, in prepare
    assert main_name not in sys.modules, main_name
AssertionError: __main__
Traceback (most recent call last):
  File "c:\python27\lib\runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "c:\python27\lib\runpy.py", line 72, in _run_code
    exec code in run_globals
  File "C:\Python27\Scripts\vprof.exe\__main__.py", line 9, in <module>
  File "c:\python27\lib\site-packages\vprof\__main__.py", line 87, in main
    program_stats = runner.run_profilers(source, config, verbose=True)
  File "c:\python27\lib\site-packages\vprof\runner.py", line 78, in run_profilers
    run_stats[option] = curr_profiler.run()
  File "c:\python27\lib\site-packages\vprof\base_profiler.py", line 170, in run
    return dispatcher()
  File "c:\python27\lib\site-packages\vprof\flame_graph.py", line 171, in profile_module
    return base_profiler.run_in_separate_process(self._profile_module)
  File "c:\python27\lib\site-packages\vprof\base_profiler.py", line 76, in run_in_separate_process
    manager = multiprocessing.Manager()
  File "c:\python27\lib\multiprocessing\__init__.py", line 99, in Manager
    m.start()
  File "c:\python27\lib\multiprocessing\managers.py", line 528, in start
    self._address = reader.recv()
EOFError
Expected results

vprof visualisations

Version and platform

Windows 10 python 2.7.9 cygwin

nvdv commented 7 years ago

Thanks for reporting!. I cannot reproduce it without cygwin installed. I am not sure I want to invest time ensuring correct operation on all kinds of Windows environments now. Might also be related to #62.