MaartenGr / PolyFuzz

Fuzzy string matching, grouping, and evaluation.
https://maartengr.github.io/PolyFuzz/
MIT License
733 stars 67 forks source link

ImportError: cannot import name 'PolyFuzz' #9

Closed adarsh-hub closed 3 years ago

adarsh-hub commented 3 years ago
Traceback (most recent call last):
  File "C:/Users/(name)/Desktop/polyfuzz.py", line 1, in <module>
    import polyfuzz
  File "C:/Users/(name)/Desktop\polyfuzz.py", line 2, in <module>
    from polyfuzz import PolyFuzz
ImportError: cannot import name 'PolyFuzz' from partially initialized module 'polyfuzz' (most likely due to a circular import) (C:/Users/(name)/Desktop\polyfuzz.py)

I installed PolyFuzz with pip just like it says here: https://pypi.org/project/polyfuzz/

What do I do to fix this error?

MaartenGr commented 3 years ago

I see you created a file called polyfuzz.py. If you try to import polyfuzz, it does not know whether to import polyfuzz or polyfuzz.py which is likely to cause the error you just posted.

If you change the name to something else, you will not have this issue. For example, change polyfuzz.py to main.py and I believe your issue will be solved.