v3.6.3.0 PermissionError: [WinError 5] Access is denied

Open
#328 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
20/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
python

Research direction

Start by reviewing the traceback locations in billiard/process.py and billiard/queues.py, then run the supplied test script in the stated Windows 10, Python 3.7.8 virtual environment. Confirm whether the PermissionError is reproducible and document a verified resolution or the information still needed to diagnose it.

Written by the indexing model from the issue text.

Description

I'm receiving a PermissionError using version 3.6.3.0 inside a virtual environment created by PyCharm. It appears to be some sort of issues in the queues.py file. Any idea on how this can be resolved? I can't upgrade or download python versions.

System details

Windows 10 64-bit
Python version: Python 3.7.8 (tags/v3.7.8:4b47a5b6ba, Jun 28 2020, 08:53:46) [MSC v.1916 64 bit (AMD64)] on win32

Traceback

Process Process-1:
Traceback (most recent call last):
  File "C:\Users\mhill\PycharmProjects\d_price_comparisons\venv\lib\site-packages\billiard\process.py", line 327, in _bootstrap
    self.run()
  File "C:\Users\mhill\PycharmProjects\d_price_comparisons\venv\lib\site-packages\billiard\process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\mhill\PycharmProjects\d_price_comparisons\venv\lib\site-packages\scrapyscript\__init__.py", line 73, in _crawl
    self.results.put(self.items)
  File "C:\Users\mhill\PycharmProjects\d_price_comparisons\venv\lib\site-packages\billiard\queues.py", line 87, in put
    if not self._sem.acquire(block, timeout):
PermissionError: [WinError 5] Access is denied

Test Script

from scrapyscript import Job, Processor
from price_comparisons import KPricingSpider, WPricingSpider, DPricingSpider
import json

test_upc = "016000124790"
test_zipcode = "46224"
test_radius = "10"
spider_list = [KPricingSpider, WPricingSpider, DPricingSpider]
job_list = [
    Job(
        spidercls,
        upc=test_upc,
        zipcode=test_zipcode,
        radius=test_radius
     ) for spidercls in spider_list
]

# Create a Processor, optionally passing in a Scrapy Settings object.
processor = Processor(settings=None)

# Start the reactor, and block until all spiders complete.
data = processor.run(job_list)

# Print the consolidated results
print(json.dumps(data, indent=4))
Dominant language
Python
Stars
436
Forks
273
Avg merge
4d 19h
Merged PRs (30d)
5

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from celery/billiard

All issues in celery/billiard

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.