vprof icon indicating copy to clipboard operation
vprof copied to clipboard

AttributeError: __exit__

Open bbbco opened this issue 6 years ago • 5 comments

Description

I'm getting the following stacktrace when I run vprof (I have tried using the packaged version 0.36.1 and the latest version).

How to reproduce
╰─ vprof --version
vprof 0.37.4
vprof -o /home/bbbco/event_blaster2.json -c p "event_blaster2.py"
# Lots of output from my script that utilizes multiprocessing, requests and boto libraries.... 
# ............
Traceback (most recent call last):
  File "/home/bbbco/bin/vprof", line 11, in <module>
    load_entry_point('vprof==0.37.4', 'console_scripts', 'vprof')()
  File "/home/bbbco/lib/python3.5/site-packages/vprof/__main__.py", line 87, in main
    program_stats = runner.run_profilers(source, config, verbose=True)
  File "/home/bbbco/lib/python3.5/site-packages/vprof/runner.py", line 78, in run_profilers
    run_stats[option] = curr_profiler.run()
  File "/home/bbbco/lib/python3.5/site-packages/vprof/base_profiler.py", line 172, in run
    return self.profile()
  File "/home/bbbco/lib/python3.5/site-packages/vprof/profiler.py", line 79, in profile_module
    return base_profiler.run_in_separate_process(self._profile_module)
  File "/home/bbbco/lib/python3.5/site-packages/vprof/base_profiler.py", line 79, in run_in_separate_process
    raise exc
AttributeError: __exit__

bbbco avatar Dec 20 '17 23:12 bbbco

Can't reproduce this one. Have you tried running another scripts with the same profiling parameters on this machine?

nvdv avatar Dec 25 '17 11:12 nvdv

I was able to work around it by using the remote option.

On Dec 25, 2017 6:36 AM, "nvdv" [email protected] wrote:

Can't reproduce this one. Have you tried running another scripts with the same profiling parameters on this machine?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/nvdv/vprof/issues/75#issuecomment-353863190, or mute the thread https://github.com/notifications/unsubscribe-auth/AAB32F1Xxe35g-egrYlLsrf8o2exSq3xks5tD4iygaJpZM4RJF76 .

bbbco avatar Dec 26 '17 00:12 bbbco

Are there any debugging methods you'd recommend to provide you more info with what is going on?

bbbco avatar Jan 08 '18 15:01 bbbco

You might try to run profiler in the same process and see if it returns more info.

nvdv avatar Jan 08 '18 17:01 nvdv

Does this happen when you set another profiling option (e.g. -c c or -c h )?

nvdv avatar Jan 14 '18 09:01 nvdv