module 'a' has no attribute func()

放肆的年华 提交于 2021-02-11 13:46:30

问题


I have 2 modules: a:

    import another_module
    def func():

b:

    import a
    x=a.func()

This is showing error: module 'a' has no attribute 'func'. What i am doing wrong in importing a.ipynb


回答1:


Make sure your module is names 'a.py', and it is in the same folder as b, otherwise, in the place where all the other modules are stored.



来源:https://stackoverflow.com/questions/61870325/module-a-has-no-attribute-func

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!