scrapfly / python-scrapfly

Scrapfly Python SDK for headless browsers and proxy rotation
https://scrapfly.io/docs/sdk/python
Other
28 stars 8 forks source link

Python SDK Import Failure #13

Closed JupitorGeorge closed 8 months ago

JupitorGeorge commented 8 months ago

Just started with the first python program example and the program fails on this initial line.

"from scrapfly import ScrapeConfig, ScrapflyClient, ScrapeApiResponse"

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

Granitosaurus commented 8 months ago

Is your python script named as scrapfly.py? This is a common Python footgun as Python imports current directory modules so you need to rename your script to not conflict with your imports: scrapfly.py -> myscrapfly.py

Closing this. Let me know if this still persists after the rename though.

JupitorGeorge commented 8 months ago

Yes it was and thank you for the quick response! It is working now! Now to see if we can capture network request and responses as we do with selenium wire.