Closed hrafnthor closed 1 year ago
I looked further into this, and started by looking at what this uberegg
library is doing. I'm not sure why this exactly is a dependency of scrapyd, as it just seems to wrap ontop of setuptools
does some file content iterations and logging.
Anyway, the issue arrises from line 45 in the uberegg.py
script which is invoking subprocess.check_call()
which raises the error.
Strangely though there is no such issue raised if the offending command referenced in the stacktrace python3 -m pip install -U -t build/bdist.linux-x86_64/egg -r requirements.txt
is called directly.
So from all this it would seem the issue isn't directly related to scrapyd. Unless it is related to the continued use of eggs (I thought those were deprecated more than a decade ago?).
Eggs are not deprecated. Scrapyd's API receives Scrapy projects as eggs.
Looking at your stacktrace I see:
Running command git clone --filter=blob:none --quiet 'ssh://****@github.com/hrafnthor/my-library.git' /tmp/pip-install-no2qcx7z/my-library_19b012bf7ea747e9b2efaf39df47abac
WARNING: Generating metadata for package my-library produced metadata for project name unknown. Fix your #egg=my-library fragments.
ERROR: Could not find a version that satisfies the requirement my-library (unavailable) (from versions: none)
ERROR: No matching distribution found for my-library (unavailable)
It looks like Scrapyd can't install your https://github.com/hrafnthor/my-library (which is a 404 for me, so I assume it is private). I suspect you need to give the user that runs Scrapyd SSH key access to your GitHub account / repository.
Thank you for the response @jpmckinney, and please pardon the my ignorance on the usage of eggs (Python packaging is new to me and it would seem information available online is not clear for new comers on if they are deprecated or not).
The issue at hand did turn out to be a naming mismatch in dependency definition for the library. It was defined with a underscore not a dash which threw the whole thing off and was subtle enough for me not to notice it until after a good while.
So like mentioned before, this had nothing to do with scrapyd.
me too this error.
See the above messages - this error is not caused by Scrapyd but by your own dependency definitions / requirements file.
Description
I have a Scrapy project that relies on a library which gets defined as a git repository in the requirements file for the project. When I attempt to deploy it to scrapyd by running
scrapyd-deploy --include-dependencies
the command fails with an error indicating some problem with the dependency definition.The initial error stack is the following:
And the contents of the referenced tmp folder's
stderr
is (I have replaced any reference to the library name with 'my-library'):The
requirements.txt
file for the scraper references the library dependency as follows (again the reference is replaced with 'my-library'):If I am understanding the error correctly then the issue seems to relate to the library dependency not having a version associated with it when the scraper project is built.
It is not immediatly clear to me why this would be. Any potential help in resolving this would be greatly appreciated.
System and env information
scrapy: 2.8.0 scrapyd: 1.4.1 python: 3.10.6 pip: 23.0.1