Advertisement
Guest User

Untitled

a guest
Oct 16th, 2011
500
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. Today's lesson: Never call your module types.py if you plan to run
  2. Python from when standing in the same directory. It took me some
  3. time to figure out what was going on:
  4.  
  5. $ touch types.py # empty file
  6. $ python
  7. Traceback (most recent call last):
  8. File "/usr/lib/python2.7/site.py", line 68, in <module>
  9. import os
  10. File "/usr/lib/python2.7/os.py", line 398, in <module>
  11. import UserDict
  12. File "/usr/lib/python2.7/UserDict.py", line 83, in <module>
  13. import _abcoll
  14. File "/usr/lib/python2.7/_abcoll.py", line 70, in <module>
  15. Iterable.register(str)
  16. File "/usr/lib/python2.7/abc.py", line 107, in register
  17. if not isinstance(subclass, (type, types.ClassType)):
  18. AttributeError: 'module' object has no attribute 'ClassType'
  19.  
  20. "Weeeaaht?"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement