ImportError: Cannot import name X

前端 未结 16 1436
隐瞒了意图╮
隐瞒了意图╮ 2020-11-22 04:33

I have four different files named: main, vector, entity and physics. I will not post all the code, just the imports, because I think that\'s where the error is. (If you want

16条回答
  •  庸人自扰
    2020-11-22 04:57

    I just got this error too, for a different reason...

    from my_sub_module import my_function
    

    The main script had Windows line endings. my_sub_module had UNIX line endings. Changing them to be the same fixed the problem. They also need to have the same character encoding.

提交回复
热议问题