Comments (12)
I thought I had this problem. Then I realised it's because I had created a script called profile.py
to run the profile! (This causes AttributeError: module 'cProfile' has no attribute 'run'
). Hope that helps!
from ci_edit.
Thanks for reporting this. I normally test with Python 2.7.10 and 3.7. I downloaded Python 3.6.8 and tried that but didn't see an issue.
Please paste the output from
$ python3 --version
into this bug so that we can see the specific 3.6 version and which platform this is happening on.
Also, consider trying Python 3.7 to see if the problem happens in that version.
from ci_edit.
It's python 3.6.7
from ci_edit.
Do we need profiling of programs for regular users at all? Maybe add some flag like "--dev" to enable profiling?
from ci_edit.
@gennad, sounds good.
I'm a bit concerned that the Python install on @navan0 's machine is damaged(?). While @gennad is correct about not needing this code, it should still work without crashing afaik.
from ci_edit.
hmm i will reinstall and check
from ci_edit.
Good to know!
Where was the profile.py created? (Was it in the ci_edit directory - with the ci.py file?)
from ci_edit.
It was in the current working directory - the profile.py script was the script I was actually running which did some setup and called the module which had the function I wanted to profile. Just a classic case of don't give your script the same name as a Python package in your path... Now I renamed it speedtest.py
.
from ci_edit.
Thanks again. Since it's been awhile since Navan0's report and the description from billtubbs seems reasonable, I'll close this (assigned to billtubbs to credit billtubbs).
from ci_edit.
import cProfile to run
from ci_edit.
it has run attribute
from ci_edit.
import cProfile
import re
for i in range(5):
print(pr.calibrate(10000))
a=cProfile.run('re.compile("Hello")')
print(a)
from ci_edit.
Related Issues (20)
- Executing full_test when inside tools directory gives error HOT 1
- Confirmation on quit HOT 1
- Delay in updation of status bar
- Fuzzy search inside the current work directory HOT 3
- Add ctags support HOT 2
- Add language server support HOT 1
- Move unit tests to the appropriate directory HOT 1
- Add a command to split the editor horizontally HOT 2
- Add a package to pypi HOT 1
- Is there a way to highlight the line in case of a syntax error? HOT 1
- 'str' object has no attribute 'decode' , Chinese user HOT 4
- Is there anyone who is working on "user customizable color scheme" ? HOT 7
- UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc3 in position 0: invalid continuation byte HOT 5
- Undo after File closing HOT 1
- Running ci_edit under Python 2 HOT 1
- py formatter needs prefs
- Cannot open file. Ubuntu 18.04 HOT 3
- How to remove auto-indentation? HOT 3
- Red highlighted words all over the place HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ci_edit.