scrapy / scrapyd

A service daemon to run Scrapy spiders
https://scrapyd.readthedocs.io/en/stable/
BSD 3-Clause "New" or "Revised" License
2.93k stars 571 forks source link

builtins.OSError: [Errno 22] Invalid argument #392

Closed DuoCaiXie closed 2 years ago

DuoCaiXie commented 3 years ago

When I run the scrapyd ,and run curl http://localhost:6800/schedule.json -d project=default -d spider=somespider The log generated is as follows:

2020-12-10T16:58:34+0800 [twisted.web.server.Request#critical] 
    Traceback (most recent call last):
      File "/root/.virtualenvs/crawl-env/lib64/python3.6/site-packages/twisted/protocols/basic.py", line 572, in dataReceived
        why = self.lineReceived(line)
      File "/root/.virtualenvs/crawl-env/lib64/python3.6/site-packages/twisted/web/http.py", line 2155, in lineReceived
        self.allContentReceived()
      File "/root/.virtualenvs/crawl-env/lib64/python3.6/site-packages/twisted/web/http.py", line 2284, in allContentReceived
        req.requestReceived(command, path, version)
      File "/root/.virtualenvs/crawl-env/lib64/python3.6/site-packages/twisted/web/http.py", line 946, in requestReceived
        self.process()
    --- <exception caught here> ---
      File "/root/.virtualenvs/crawl-env/lib64/python3.6/site-packages/twisted/web/server.py", line 235, in process
        self.render(resrc)
      File "/root/.virtualenvs/crawl-env/lib64/python3.6/site-packages/twisted/web/server.py", line 302, in render
        body = resrc.render(self)
      File "/root/.virtualenvs/crawl-env/lib64/python3.6/site-packages/twisted/web/resource.py", line 265, in render
        return m(request)
      File "/root/.virtualenvs/crawl-env/lib64/python3.6/site-packages/twisted/web/static.py", line 686, in render_GET
        producer.start()
      File "/root/.virtualenvs/crawl-env/lib64/python3.6/site-packages/twisted/web/static.py", line 803, in start
        self.fileObject.seek(self.offset)
    builtins.OSError: [Errno 22] Invalid argument

but why? when I use the cmdling 'scrapy crawl xxx' ,is formal,so,why

Digenis commented 3 years ago

don't run scrapy as root are you running scrapyd in some docker image? did you mount a remote file system for your dbs or eggs directories?

jpmckinney commented 2 years ago

Closing as no response to question in several months.

frshman commented 2 years ago

same problem!

jpmckinney commented 2 years ago

Need more info @frshman. See the questions above.