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

Used profile but no output was shown, than I saved data and it crashed #8078

Closed
alessio-greco opened this issue Oct 15, 2018 · 5 comments
Closed

Comments

@alessio-greco
Copy link

Description

What steps will reproduce the problem?

#1 Start Profiling
#2 Run the code to profile
#3 When run ended, Stop profiling

Output window is open, yet no profiling info is shown.

#4 Save the data

Crash!

Traceback

  File "C:\Users\mysti\Anaconda3\lib\site-packages\spyder_profiler\widgets\profilergui.py", line 186, in save_data
    self.datatree.save_data(filename)
  File "C:\Users\mysti\Anaconda3\lib\site-packages\spyder_profiler\widgets\profilergui.py", line 503, in save_data
    self.stats1[0].dump_stats(filename)
AttributeError: 'ProfilerDataTree' object has no attribute 'stats1'

Versions

  • Spyder version: 3.3.1
  • Python version: 3.6.6
  • Qt version: 5.9.6
  • PyQt5 version: 5.9.2
  • Operating System: Windows 10

Dependencies

pyflakes >=0.6.0  :  2.0.0 (OK)
pycodestyle >=2.3 :  2.4.0 (OK)
pygments >=2.0    :  2.2.0 (OK)
sphinx >=0.6.6    :  1.8.1 (OK)
rope >=0.9.4      :  0.11.0 (OK)
jedi >=0.9.0      :  0.12.1 (OK)
nbconvert >=4.0   :  5.3.1 (OK)
pandas >=0.13.1   :  0.23.4 (OK)
numpy >=1.7       :  1.15.2 (OK)
sympy >=0.7.3     :  1.3 (OK)
cython >=0.21     :  0.28.5 (OK)
qtconsole >=4.2.0 :  4.4.1 (OK)
IPython >=4.0     :  7.0.1 (OK)
matplotlib >=2.0.0:  3.0.0 (OK)
pylint >=0.25     :  2.1.1 (OK)
@ccordoba12
Copy link
Member

Please post the code you started to profile, or at least a simple code sample that generates this error. Thanks!

@alessio-greco
Copy link
Author

I found the part "Output window is open, yet no profiling info is shown." is actually dependant on me(I thought the profiler would work with "Run Current Cell")
The crash seems to not be actually dependant on the code itself, but on "trying to save a non existent profiler result".
Steps:

  1. Start Profiling
  2. Stop Profiling before the profiling ended
  3. Try Saving the profile

@ccordoba12
Copy link
Member

Ok, thanks for the info. We'll this in a future release.

@oscargus
Copy link
Contributor

It seems like this has been sorted out. Currently one can click both Output and Save directly on startup (or after a cancelled run). For save, a file dialog shows up, but no file is created. Which is maybe not the ideal situation, but at least better than a crash.

@ccordoba12 ccordoba12 removed this from the important milestone Jul 20, 2019
@ccordoba12
Copy link
Member

@oscargus, thanks for verifying that is no longer a problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants