Comments (4)
Can you tell me the Python version you are using? It is probably related to that.
from portalocker.
Can you try the develop branch to see if that helps?
from portalocker.
hi, thanks for the fast response.
I am currently running this on Python 3.8.5.
I downloaded and installed the develop branch. I saw that the redis submodule has been renamed to redis_lock. After running the example code lock = portalocker.RedisLock('some_lock_channel_name')
I still got a TypeError as before TypeError: 'NoneType' object is not callable
. When I imported the redis_lock submodule directly I observed a ModuleNotFoundError
(ModuleNotFoundError: No module named 'redis'
). Then I realised that redis is not the name of the original submodule that is part of the portalocker package but an independent package which needs to be installed first.
Following, I looked into the setup.py and see that redis is stated as a required package but for an unknown reason it wasn't installed automatically during my previous attempts. After installing redis and reinstalling portalocker it seems to work without any problems.
Thank you for the fast response.
Best regards,
Christian
from portalocker.
Ah, that makes sense. The redis requirement is an optional one. To install you could do: pip install portalocker[redis]
Not everyone that uses this package is interested in redis so it should not be required in all cases
from portalocker.
Related Issues (20)
- Rlock - with limit? HOT 6
- What are the different locking mechanisms? HOT 2
- Fix `ResourceWarning` when `AlreadyLocked` HOT 6
- Declare PEP 561 compliance (type checking support) HOT 3
- Sorry for OT HOT 2
- Neither exclusive nor shared locks working as expected on Windows HOT 2
- Windows shared lock with Python 3 HOT 11
- race condition for⦠file metadata? HOT 4
- Setting the DenyMode against a file HOT 2
- is lock reenterable? HOT 2
- distutils was depreacted in Python 3.10 HOT 2
- Timeout not working with SHARED flag HOT 4
- Better Examples Needed HOT 3
- LockException(OSError(22, 'Invalid argument')) when using NON_BLOCKING flag on Linux HOT 2
- DLL load failed while importing win32file HOT 1
- What is the actual license for this project? HOT 1
- fileno support HOT 2
- Mismatch between documentation and implementation HOT 3
- How to lock a file but be able to read it HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from portalocker.