python-memcached
python-memcached copied to clipboard
ValueError: invalid literal for int() with base 10: ''
mc.get does not work at all
Traceback (most recent call last):
File "test.py", line 87, in <module>
state = mc.get("run_state")
File "build/bdist.linux-armv7l/egg/memcache.py", line 1129, in get
... 42: 'douglass adams',
File "build/bdist.linux-armv7l/egg/memcache.py", line 1113, in _get
>>> mc.get_multi(['k1', 'k2', 'nonexist'],
File "build/bdist.linux-armv7l/egg/memcache.py", line 1101, in _unsafe_get
>>> success = mc.set("foo", "bar")
File "build/bdist.linux-armv7l/egg/memcache.py", line 1275, in _recv_value
raise Client.MemcachedKeyNoneError("Key is empty")
ValueError: invalid literal for int() with base 10: ''
Would it be possible to supply a minimal test script that reproduces your problem?
mc = memcache.Client(['127.0.0.1:11211'], debug=0)
value = mc.get("curr_item")
Nothing more than this. What is important. It's on Raspberry PI. "curr_item" is set by
$m = new Memcached();
$m->addServer('localhost', 11211);
$m->set('curr_item',$value);
Writing in python and reading in php works.
mc.set("send", "no")
My guess is the clients set different flags, thus making them incompatible. Whatever php/pecl memcache sets for a flag of value 2, probably means something different than "integer". Looking at the php/pecl memcache code, it looks like it means MMC_COMPRESSED over there.