juliomalegria / python-craigslist

Simple Craigslist wrapper
MIT No Attribution
387 stars 117 forks source link

ImportError: cannot import name 'CraigslistHousing' from partially initialized module 'craigslist' (most likely due to a circular import) #80

Closed usctzen closed 4 years ago

usctzen commented 4 years ago

Hi,

First, THANK YOU.

I installed the module as instructed and copied the Housing script for a test. I am getting the error in the title.

To be noted that I tried the script to show the filters in the Python terminal and it worked with no problems. If I use the demo script in the Python terminal, it also works.

When I run the script thru the 'run' command in PyCharm, I get the error message.

usctzen commented 4 years ago

I am living the request for help up so if anybody who encounters this problem knows how to fix it.

The solution is simple: NEVER NAME YOUR SCRIPT FILES WITH A MODULE NAME. I was trying to run this in a file named: craigslist.py

Hopefully, I will never do this mistake again.

Thanks again for the module.

juliomalegria commented 4 years ago

Thanks @usctzen for using the module, and thanks for posting the solution to the issue.