"PermissionError deploying Scrapy project to Scrapyd using scrapyd-deploy on Windows"

43 views Asked by At

I'm attempting to deploy a Scrapy project to Scrapyd on a Windows environment using scrapyd-deploy, but I'm encountering a PermissionError.

Here's my environment:

OS: Windows 10
Python Version: 3.11
Scrapyd Version:1.4.2
Scrapy Version:2.11.0

Command: scrapyd-deploy -p data_crawler --version v1

D:.
├─data_crawler
│  ├─build
│  │  ├─bdist.win-amd64
│  │  └─lib
│  │      └─data_crawler
│  │          └─spiders
│  ├─data_crawler
│  │  └─spiders
│  ├─dbs
│  ├─dist
│  └─project.egg-info
├─dbs
├─eggs
│  └─data_crawler
└─logs

The log is like this

2023-09-19T19:56:12+0800 \[\_GenericHTTPChannelProtocol,2,127.0.0.1\] Unhandled Error
    ... (truncate some of the traceback for brevity)
    PermissionError: \[WinError 32\] The process cannot access the file because it is being used by another process.: 'C:\\Users\\amy10\\AppData\\Local\\Temp\\data_crawler-v1-zs5jfyea.egg'`

I've made sure that there are no other processes using the mentioned .egg file. I've restarted Scrapyd and retried deployment but faced the same issue. Is there a known reason for this PermissionError occurring on Windows, and what can I do to fix it?

1

There are 1 answers

0
Jack On

This looks like its been fixed in 1.4.3 scrapyd