Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: invalid literal for int() with base 10: '' #119

Open
ghost opened this issue Mar 11, 2017 · 3 comments
Open

ValueError: invalid literal for int() with base 10: '' #119

ghost opened this issue Mar 11, 2017 · 3 comments

Comments

@ghost
Copy link

ghost commented Mar 11, 2017

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: ''
@jeteon
Copy link

jeteon commented Apr 1, 2017

Would it be possible to supply a minimal test script that reproduces your problem?

@ghost
Copy link
Author

ghost commented Apr 2, 2017

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")

@dropwhile
Copy link
Contributor

dropwhile commented Jan 25, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants