Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #95798 > unrolled thread
| Started by | kbtyo <ahlusar.ahluwalia@gmail.com> |
|---|---|
| First post | 2015-08-31 12:29 -0700 |
| Last post | 2015-09-01 14:07 +1000 |
| Articles | 5 — 4 participants |
Back to article view | Back to comp.lang.python
AttributeError: 'module' object has no attribute '__path__' kbtyo <ahlusar.ahluwalia@gmail.com> - 2015-08-31 12:29 -0700
Re: AttributeError: 'module' object has no attribute '__path__' Laura Creighton <lac@openend.se> - 2015-08-31 22:17 +0200
Re: AttributeError: 'module' object has no attribute '__path__' Laura Creighton <lac@openend.se> - 2015-09-01 00:15 +0200
Re: AttributeError: 'module' object has no attribute '__path__' Rustom Mody <rustompmody@gmail.com> - 2015-08-31 20:32 -0700
Re: AttributeError: 'module' object has no attribute '__path__' Chris Angelico <rosuav@gmail.com> - 2015-09-01 14:07 +1000
| From | kbtyo <ahlusar.ahluwalia@gmail.com> |
|---|---|
| Date | 2015-08-31 12:29 -0700 |
| Subject | AttributeError: 'module' object has no attribute '__path__' |
| Message-ID | <97927258-d389-4bd6-a861-e122e4247ac0@googlegroups.com> |
I am using Jupyter notebooks, with Python 3.4. The error below references the Anaconda distribution package. This error occurred quite precipitously (only 2 minutes before I was able to import the modules). I am using Windows 7. My path in the console uses Python27. I also have python 34 as well. I am not sure where to start modifying the path and fear that I will break my initial setup. I welcome feedback on next steps.
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
C:\Program Files\New\lib\importlib\_bootstrap.py in _find_and_load_unlocked(name, import_)
AttributeError: 'module' object has no attribute '__path__'
During handling of the above exception, another exception occurred:
ImportError Traceback (most recent call last)
<ipython-input-4-0ed85c3e8b64> in <module>()
8 import fnmatch
9 # import xml.etree.cElementTree as ElementTree
---> 10 from xml.etree.ElementTree import XMLParser
11 import xml.etree.ElementTree as ElementTree
12 import glob
ImportError: No module named 'xml.etree'; 'xml' is not a package
[toc] | [next] | [standalone]
| From | Laura Creighton <lac@openend.se> |
|---|---|
| Date | 2015-08-31 22:17 +0200 |
| Message-ID | <mailman.19.1441052247.23514.python-list@python.org> |
| In reply to | #95798 |
Check and see if you have a file in your working directory with the very same name as a module you are trying to import, or the_same_name.py If so, change the name of that file to something else. Laura
[toc] | [prev] | [next] | [standalone]
| From | Laura Creighton <lac@openend.se> |
|---|---|
| Date | 2015-09-01 00:15 +0200 |
| Message-ID | <mailman.21.1441059352.23514.python-list@python.org> |
| In reply to | #95798 |
In a message of Mon, 31 Aug 2015 17:01:07 -0400, Saran Ahluwalia writes: >Laura, > >It does not appear to be the case. I actually had to actually unset the >PYTHONPATH. > >Thanks for your suggestion. > >Sincerely, >Saran Are you and kbtyo <ahlusar.ahluwalia@gmail.com> the same person? If deleting your PYTHONPATH fixed it, then somewhere in that PATH if not your current working directory, you have a different file that shadowed something you are trying to import. Can you make the effort to move your cursor to the bottom of the mail you are replying to, before you start typing, so that your reply comes after what was said before, instead of first thing, and thus before what was said before. Laura
[toc] | [prev] | [next] | [standalone]
| From | Rustom Mody <rustompmody@gmail.com> |
|---|---|
| Date | 2015-08-31 20:32 -0700 |
| Message-ID | <84d4336f-a6bc-4c3f-9550-a4ff2e3e7901@googlegroups.com> |
| In reply to | #95800 |
On Tuesday, September 1, 2015 at 3:46:15 AM UTC+5:30, Laura Creighton wrote: > Can you make the effort to move your cursor to the bottom of > the mail you are replying to, before you start typing, > so that your reply comes after what was said before, instead of > first thing, and thus before what was said before. In gmail its trivially simple but not all that obvious: There are 3 tiny little dots below which conceal the earlier context. You have to click that to open it. And then start entering below that [Thanks to ChrisA I now know you can also Ctrl-A to open it. Where does Chris find out such arcana I wonder?!]
[toc] | [prev] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2015-09-01 14:07 +1000 |
| Message-ID | <mailman.33.1441080460.23514.python-list@python.org> |
| In reply to | #95813 |
On Tue, Sep 1, 2015 at 1:32 PM, Rustom Mody <rustompmody@gmail.com> wrote: > On Tuesday, September 1, 2015 at 3:46:15 AM UTC+5:30, Laura Creighton wrote: >> Can you make the effort to move your cursor to the bottom of >> the mail you are replying to, before you start typing, >> so that your reply comes after what was said before, instead of >> first thing, and thus before what was said before. > > In gmail its trivially simple but not all that obvious: > There are 3 tiny little dots below which conceal the earlier context. > You have to click that to open it. And then start entering below that > > [Thanks to ChrisA I now know you can also Ctrl-A to open it. > Where does Chris find out such arcana I wonder?!] It was an accident! (I'm sorry, Anna!) I use Gmail too, and one day I happened to hit Ctrl-A. Since then, I've used it fairly often. ChrisA
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web