Menu

#1 Solution for importing the packages

open
nobody
None
5
2012-09-18
2010-03-20
No

Sometimes there is an error as "Traceback (most recent call last):
File "D:\fuzzy\pytipper3.py", line 102, in <module>
fuzzy.doc.structure.dot.dot.print_header(f,"XXX")
AttributeError: 'module' object has no attribute 'dot'"
that says Python could not find the package;
By adding the module name in init .py file
such as
import dot
you can solve the problem.
Putting the module name in init.py is very useful.

Discussion

  • Bairam Komaki

    Bairam Komaki - 2010-03-20

    init .py file for directory " fuzzy.doc.structure.dot."

     
  • Rene Liebscher

    Rene Liebscher - 2010-03-30

    Could you please provide the full traceback, I don't see the reason for error.

     
  • Bairam Komaki

    Bairam Komaki - 2010-04-04

    In windows (OS) , sometimes it says ,there is no module such as "dot ",
    It is a little strange , because the empty "init" file is enough to trace and follow the direction of modules.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.