onnx2torch icon indicating copy to clipboard operation
onnx2torch copied to clipboard

Circular import

Open xiaojieguo opened this issue 1 year ago • 1 comments

Hi I installed the newest package, but have the following error:

from onnx2torch import convert ImportError: cannot import name 'convert' from partially initialized module 'onnx2torch' (most likely due to a circular import)

What's wrong with me?

xiaojieguo avatar Nov 27 '23 09:11 xiaojieguo

Hello, I met the same issue and successfully solved it. The reason for "circular import" is that the name of my py file is "onnx2torch", but the model's name is onnx2torch, so they are in conflict. Maybe you should check you file name : )

colinzhaoxp avatar Dec 06 '23 13:12 colinzhaoxp