Celery - lock.py - NoneType does not support the buffer interface
This happens occasionally, during otherwise-normal operation.
[2016-04-16 13:04:22,012: WARNING/Worker-5] Got 240 predictions for 1 agencies in 1.09 sec.
[2016-04-16 13:04:23,938: ERROR/MainProcess] Task celerytasks.update_vehicle_locations[6e1de22f-146c-4f0e-96fa-06c67a06c4ff] raised unexpected: TypeError("'NoneType' does not support the buffer interface",)
Traceback (most recent call last):
File "/home/anton/.virtualenvs/pybusmap/lib/python3.4/site-packages/celery/app/trace.py", line 240, in trace_task
R = retval = fun(*args, **kwargs)
File "/home/anton/pybusmap/celerytasks.py", line 27, in __call__
return TaskBase.__call__(self, *args, **kwargs)
File "/home/anton/.virtualenvs/pybusmap/lib/python3.4/site-packages/flask_celery.py", line 229, in __call__
return task_base.__call__(self, *_args, **_kwargs)
File "/home/anton/.virtualenvs/pybusmap/lib/python3.4/site-packages/celery/app/trace.py", line 438, in __protected_call__
return self.run(*args, **kwargs)
File "/home/anton/pybusmap/celerytasks.py", line 74, in update_vehicle_locations
vl_count = len(Nextbus.get_vehicle_locations(agencies, truncate=False))
File "/home/anton/pybusmap/nextbus.py", line 375, in get_vehicle_locations
with Lock("agencies", shared=True), Lock("routes", shared=True), Lock("vehicle_locations"):
File "/home/anton/pybusmap/lock.py", line 56, in __enter__
(existing_expires, existing_pid) = pickle.loads(oldlock)
TypeError: 'NoneType' does not support the buffer interface