cohaolain / ryanair-py

This is an open source Python module which allows you to retrieve the cheapest flights, with or without return flights, within a given set of dates.
https://github.com/cohaolain/ryanair-py
MIT License
51 stars 15 forks source link

cannot import name 'Ryanair' from partially initialized module 'ryanair' #15

Closed alrf closed 7 months ago

alrf commented 7 months ago

On from ryanair import Ryanair I'm getting:

ImportError: cannot import name 'Ryanair' from partially initialized module 'ryanair' (most likely due to a circular import)
python3.11 --version
Python 3.11.7

ryanair-py         3.0.0
mo-tech55 commented 7 months ago

I think you should not name your file ryanair. Try changing the name and that should fix it

cohaolain commented 7 months ago

Agree with @mo-tech55 , sounds like you've called your python file ryanair.py and are now trying to get the file to import itself. Try naming it something else.