Comments (4)
Actually it might be a problem with str-unicode conversion.
Another snippet of code:
q = client.query('logs', 'demo1')
q.where(p.equals('uuid', '12b9996cbd45492091d0daf17da3b5b9'))
q.foreach(callback)
Nothing returned. Trying scan:
q = client.scan('logs', 'demo1')
q.select('uuid')
def callback(r):
if r[2]['uuid'] == '12b9996cbd45492091d0daf17da3b5b9': print r
q.foreach(callback)
Prints: (('logs', 'demo1', None,
bytearray(b'\xe4\x1c\xb5VNw\x1aO#+_\xd7\xf8\x84\x81\xbdCz|\xff')),
{'gen': 1, 'ttl': 2591537},
{'uuid': u'12b9996cbd45492091d0daf17da3b5b9'})
So the record is actually there, but where
cannot it find due to unknown reason. If I try to set the where
as unicode - I get the following error:
q.where(p.equals('uuid', u'12b9996cbd45492091d0daf17da3b5b9'))
(-2L, 'predicate is invalid.', 'src/main/query/where.c', 225)
from aerospike-client-python.
Hmm, it seems the problem is with IPython... I can't believe it but...
When pasting the following lines one by one:
In [47]: q = client.query('logs2', 'ORG-demo')
In [48]:
In [48]: q.where(p.equals('owner', 'demo'))
Out[48]: <aerospike.Query at 0x7fc5345fa670>
In [49]:
In [49]: q.foreach(callback)
---------------------------------------------------------------------------
Exception Traceback (most recent call last)
<ipython-input-49-fdc57a57e0c2> in <module>()
----> 1 q.foreach(callback)
Exception: (204L, 'AEROSPIKE_ERR_INDEX', None, None)
I got an error. If I copy them and use %paste:
In [50]: %paste
q = client.query('logs2', 'ORG-demo')
q.where(p.equals('owner', 'demo'))
q.foreach(callback)
## -- End pasted text --
{'uuid': u'8928a8aed6d949489e30d9d529afbcb6', 'owner': u'demo'}
{'uuid': u'76d51d830925402a88a9ccfeabb7efa1', 'owner': u'demo'}
I'll continue thinking on what might cause this, but the bug seems invalid anyway.
from aerospike-client-python.
Huh, that's odd. If you reopen, please add the OS, version of Python you're using and which client release you're on.
Thanks!
from aerospike-client-python.
I'm using Ubuntu 14.10, python 2.7, aerospike 1.0.34, latest from PyPI. Running code from an application seems fine, no worries. It is just IPython behaving strange.
from aerospike-client-python.
Related Issues (20)
- Unable to install on Amazon Linux HOT 1
- Support for min_conns_per_node HOT 2
- execute udf aerospike:remove failed HOT 3
- Unable to install on MacOS 12.2 (M1) HOT 9
- add python 3.10 support HOT 2
- Aerospike alpine installation failure HOT 6
- Error while running in Ubuntu 22.04 HOT 1
- `map_operations.map_remove_by_key` has `return_type` but `expressions.MapRemoveByKey` does not HOT 1
- Help wanted! Update in nested data HOT 1
- Query on two fields (Alternate of predexp) HOT 2
- support pypy 3.9 HOT 1
- Error status of aerospike_scan_wait() is fixed on ParamError, therefore cannot detect error of inside the function. HOT 1
- How to use put_async.py? HOT 2
- Is the Aerospike Python client compatible with Debian 11? HOT 3
- Max records for a batch_write call is less than server's default HOT 8
- Windows support / compability HOT 9
- Memory Leak while getting data from aerospike HOT 15
- Need more Detail Exception ( raise error if port dataType is not PyLong) HOT 3
- Losing connection to aerospike cluster with new gunicorn HOT 3
- chromium 在gclinet sync 报错 HOT 1
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 aerospike-client-python.