Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old October 10th, 2008, 06:55 AM
Robert Hancock
Guest
 
Posts: n/a
Default urlparse import Faillure

Python 2.5.2 (r252:60911, Aug 28 2008, 23:51:17)
[GCC 4.3.0 20080428 (Red Hat 4.3.0-8)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Quote:
Quote:
Quote:
>>import CGIHTTPServer
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.5/CGIHTTPServer.py", line 28, in
<module>
import urllib
File "/usr/local/lib/python2.5/urllib.py", line 30, in <module>
from urlparse import urljoin as basejoin
File "/usr/local/lib/python2.5/urlparse.py", line 3, in <module>
See RFC 1808: "Relative Uniform Resource Locators", by R.
Fielding,
ImportError: cannot import name urlparse
Quote:
Quote:
Quote:
>>>
urlparse.py
"""Parse (absolute and relative) URLs.

See RFC 1808: "Relative Uniform Resource Locators", by R. Fielding,
UC Irvine, June 1995.
"""

__all__ = ["urlparse", "urlunparse", "urljoin", "urldefrag",
"urlsplit", "urlunsplit"]

It points to the third line of the comment. Any ideas on how to
proceed with the debugging?
  #2  
Old October 10th, 2008, 06:55 PM
Wojtek Walczak
Guest
 
Posts: n/a
Default Re: urlparse import Faillure

On Thu, 9 Oct 2008 22:47:58 -0700 (PDT), Robert Hancock wrote:
Quote:
Quote:
Quote:
>>>import CGIHTTPServer
....
Quote:
ImportError: cannot import name urlparse
Quote:
Quote:
>>>>
....
Quote:
It points to the third line of the comment. Any ideas on how to
proceed with the debugging?
Have you tried getting rid of this comment? I doubt that
the comment is a reason of this error, but it seems that
it shadows the real problem. Moreover, try to import urlparse
itself and check if you got the pyc file for urlparse.py
in your */lib/python2.5/ directory.

--
Regards,
Wojtek Walczak,
http://tosh.pl/gminick/
  #3  
Old October 13th, 2008, 12:55 AM
Robert Hancock
Guest
 
Posts: n/a
Default Re: urlparse import Faillure

On Oct 10, 1:48*pm, Wojtek Walczak <gmin...@bzt.bztwrote:
Quote:
On Thu, 9 Oct 2008 22:47:58 -0700 (PDT), Robert Hancock wrote:
Quote:
Quote:
>>import CGIHTTPServer
...
Quote:
ImportError: cannot import name urlparse
>
...
Quote:
It points to the third line of the comment. *Any ideas on how to
proceed with the debugging?
>
Have you tried getting rid of this comment? I doubt that
the comment is a reason of this error, but it seems that
it shadows the real problem. Moreover, try to import urlparse
itself and check if you got the pyc file for urlparse.py
in your */lib/python2.5/ directory.
>
--
Regards,
Wojtek Walczak,http://tosh.pl/gminick/
It turns out that I had a script named urlparse.py in my path in
another directory. I'm still not sure why the traceback pointed to
the comment.
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles