I've set up Anaconda on my Windows 10 machine and I'm now trying to debug my Scrapy Spider with it.
Scrapy is installed on a virtual conda environment and running "(testscraping) C:\Projects\testscraping> scrapy crawl myspider" works perfectly well.
Now I want to be able to debug my script through PyCharm, but it keeps throwing errors at me and I'm having a hard time figuring out what I'm doing wrong.
I've set up my project interpreter to point to python.exe in the virtual env folder. However I can't see anywhere that this is correctly identified as a conda environment.
This works just fine and PyCharm recognizes the packages installed in the conda envrionment.
Then I've set up the configuration to execute "crawl myspider" through "cmdline.py" in my venv (also tried with the scrapy.cmdline as module instead with no luck)
Running this results in the following error:
However running the "scrapy crawl myspider" command through the Anaconda Prompt works perfectly fine.
Why does this happen? Is it because my Conda environment hasn't been activated when running the script? And if so how do I get PyCharm to activate it before running the script?