Skip to content

Fatal error launching scrapy>1.6.0 from Anaconda Prompt #4289

Closed
@pwinzer

Description

@pwinzer

Description

I'm having the same issue reported in issue 4075, but I'd like to provide some more information.

Steps to Reproduce

Fresh Anaconda install, installed scrapy with conda install -c conda-forge scrapy, as specified in official Windows installation instructions. Scrapy 1.8.0 was successfully installed.

Enter a scrapy command: scrapy shell, scrapy version, scrapy startproject spam, etc.

Expected behavior:

Scrapy commands work as documented, as they have in the past.

Actual behavior:

Scrapy commands yield
Fatal error in launcher: Unable to create process using '"d:\bld\scrapy_1572360424769\_h_env\python.exe" "C:\Users\path\to\Continuum\anaconda3\Scripts\scrapy.exe" version'

There is no d:\ on my machine. I have no idea where this path is coming from.

Reproduces how often:

100% in my current installation

Work around:

python -m scrapy <command> rather than scrapy <command>

Versions

python -m scrapy version --verbose yields.
Scrapy : 1.8.0
lxml : 4.4.1.0
libxml2 : 2.9.9
cssselect : 1.1.0
parsel : 1.5.2
w3lib : 1.21.0
Twisted : 19.10.0
Python : 3.7.4 (default, Aug 9 2019, 18:34:13) [MSC v.1915 64 bit (AMD64)]
pyOpenSSL : 19.0.0 (OpenSSL 1.1.1d 10 Sep 2019)
cryptography : 2.7
Platform : Windows-10-10.0.18362-SP0

Additional context

It appears any version after 1.6.0 has this issue. Downgrading to 1.6.0 with conda install -c conda-forge scrapy=1.6.0 resolves the launching issue. I installed a few versions of 1.7 with conda install -c conda-forge scrapy=1.7.x and the launcher issue was present there.

Activity

Srutakirti

Srutakirti commented on Apr 8, 2020

@Srutakirti

Thank you for posting this , it wasnt working for me and i downgraded to 1.6 and it worked.

GeorgeA92

GeorgeA92 commented on Apr 9, 2020

@GeorgeA92
Contributor

The easiest way to overcome this is to use command with pythom -m
like python -m scrapy shell , python -m scrapy crawl quotes etc. without any reinstalls.

Also this path practically occures inside only one place - on scrapy_****/recipe/info/meta.yaml file.

I compared that /recipe/info/meta.yaml files for all versions of scrapy previously installed on my PC with conda(Anaconda).

And I found one.. unexpected difference between files for versions after 1.6.0 and older versions
Files for scrapy versions after 1.6.0 don't have this 2 lines:

    entry_points:
        - scrapy = scrapy.cmdline:execute

As far as I understand this is conda package equivalent of these code lines from setup.py and it is responsible for binding scrapy.cmdline.execute as separate scrapy console command.

scrapy/setup.py

Lines 47 to 49 in 49357cc

entry_points={
'console_scripts': ['scrapy = scrapy.cmdline:execute']
},

Screenshots

1_5_1
1_6_0
1_8_0
2_0_1

pwinzer

pwinzer commented on Apr 9, 2020

@pwinzer
Author

Thanks for the great insights, @GeorgeA92 ! I'll report the bug to Anaconda and see where I can get.

GeorgeA92

GeorgeA92 commented on Apr 9, 2020

@GeorgeA92
Contributor

I'll report the bug to Anaconda and see where I can get.

@pwinzer I think this issue is related to scrapy package on conda-forge and it should be redirected to maintainers of that package.
not to Anaconda.
@camfrout already reported it here

pwinzer

pwinzer commented on Apr 9, 2020

@pwinzer
Author

Haha I was on my way back here because I had just dug that up as well. Thanks, again.

Given that, I will close this issue.

Arregator

Arregator commented on Apr 10, 2020

@Arregator

I fixed those lines in /recipe/info/meta.yaml, but it did not resolve the problem, I still get that Fatal error in launcher: Unable to create process using '"d:\bld\scrapy_1584555997548\_h_env\python.exe" error...

Soumarjit

Soumarjit commented on Apr 16, 2020

@Soumarjit

I am in the same problem too.

chad011110

chad011110 commented on May 10, 2020

@chad011110

I am having the same issue...

Gallaecio

Gallaecio commented on May 11, 2020

@Gallaecio
Member

As @GeorgeA92 said, @camfrout already reported this at conda-forge/scrapy-feedstock#37

Please, follow conda-forge/scrapy-feedstock#37 for updates surrounding this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @Gallaecio@GeorgeA92@pwinzer@Soumarjit@Arregator

        Issue actions

          Fatal error launching scrapy>1.6.0 from Anaconda Prompt · Issue #4289 · scrapy/scrapy