Changes between Initial Version and Version 2 of Ticket #15737


Ignore:
Timestamp:
Apr 1, 2011, 10:43:42 PM (13 years ago)
Author:
Karen Tracey
Comment:

I think you must have a module named profile in your Django example app? At least that is one way I can recreate your error. Prior to creating the profile module in my test project I had no trouble importing hotshot.stats:

C:\u\kmt\software\web\playground>"\bin\Python27\python.exe" manage.py shell
Python 2.7.1 (r271:86832, Nov 27 2010, 18:30:46) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> import hotshot.stats
>>> quit()

C:\u\kmt\software\web\playground>mkdir profile

C:\u\kmt\software\web\playground>touch profile\__init__.py

C:\u\kmt\software\web\playground>"\bin\Python27\python.exe" manage.py shell
Python 2.7.1 (r271:86832, Nov 27 2010, 18:30:46) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> import hotshot.stats
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "C:\bin\Python27\lib\hotshot\stats.py", line 74, in <module>
    class Profile(profile.Profile):
AttributeError: 'module' object has no attribute 'Profile'
>>>

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #15737

    • Property Resolutionworksforme
    • Property Status newclosed
  • Ticket #15737 – Description

    initial v2  
    1 Trying to import hotshot.stats from Python fails while using the Django shell fails.
     1Trying to import hotshot.stats from Python succeeds while using the Django shell fails.
    22
    33{{{
Back to Top