Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > ImportError: cannot import name dns

Reply
Thread Tools

ImportError: cannot import name dns

 
 
Jack Bates
Guest
Posts: n/a
 
      09-13-2011
Why is the following ImportError raised?

$ ./test
Traceback (most recent call last):
File "./test", line 3, in <module>
from foo import dns
File "/home/jablko/foo/dns.py", line 1, in <module>
from foo import udp
File "/home/jablko/foo/udp.py", line 1, in <module>
from foo import dns
ImportError: cannot import name dns
$

I reproduce this error with the following four files and five lines:

== foo/dns.py ==
from foo import udp

== foo/udp.py ==
from foo import dns

== foo/__init__.py ==
(empty)

== test ==
#!/usr/bin/env python

from foo import dns
 
Reply With Quote
 
 
 
Reply

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 On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using DNS name verses Machine Name causes 403 error Jason ASP .Net Web Services 5 09-18-2006 07:49 AM
DNS query to internal DNS server from static NAT host none Cisco 5 04-25-2006 03:11 AM
DNS query from outside to internal, public DNS server Lars Bonnesen Cisco 9 04-08-2006 11:16 AM
Handling import conflicts when module has the same name as a library module that it needs to import? plb Python 0 02-08-2005 01:08 PM
Handling import conflicts when module has the same name as a library module that it needs to import? plb Python 0 02-08-2005 01:01 PM



Advertisments