开发者

ImportError: cannot import name ModuleA

I have the following stacktrace when I try to import ModuleA:

    Traceback (most recent call last):                                                          
  File "menu.py", line 9, in <module>                                                       
    from tmserver import Module1                                                          
  File "~/tmserver/Module1.py", line 10, in <module>                                                                           
    from tmserver.PackageA import ModuleA                                             
  File "~/tmserver/Package1/ModuleA.py", line 8, in <module>                                                               
    from tmserver.Package2 import Module2                                               
  Fil开发者_JS百科e "~/tmserver/Package2/Module2.py", line 15, in <module>                                                                
    from tmserver.Package3 import Module3                                                      
  File "~/tmserver/Package3/Module3.py", line 5, in <module>                                                                        
    from tmserver.PackageA import ModuleA                                            
ImportError: cannot import name ModuleA

Is this because it's importing ModuleA again/recursively?


That would seem like the logical conclusion; perhaps if you posted samples of the code you were running you'd be able to get a better reply?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜