john-kurkowski / john-kurkowski/tldextract

Ocasional PermissionError when running tldextract.extract

Open
#277 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
2k
Forks
219
PR merge metrics
No merged PRs in 30d

Description

Hi, I've encountered some ocasional `PermissionError` exceptions when calling `tldextract.extract` , but I'm not sure if this can be reproduced reliably.

I also mention that I'm running version 3.1, but I haven't seen any related fixes in the changelog. I'll upgrade to latest regardless.

Here are some logs from sentry:

```
Attempting to acquire lock XXX on /root/.cache/python-tldextract/3.9.12.final__local__xxx__tldextract-3.1.0/publicsuffix.org-tlds/xxx.tldextract.json.lock

PermissionError: [Errno 13] Permission denied: '/root/.cache/python-tldextract/3.9.12.final__local__xxx__tldextract-3.1.0/publicsuffix.org-tlds/xxx.tldextract.json.lock'
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the tldextract.extract call and the cache lock path shown in the logs, then inspect how cache access and lock acquisition handle filesystem permissions. Reproduce the intermittent PermissionError if possible and determine the expected behavior when the cache lock cannot be opened; done means the failure is covered by a reliable test and the behavior is documented by that test.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.