couchbaselabs / couchbase-python-cffi Goto Github PK
View Code? Open in Web Editor NEWImplementation of the Python Couchbase API using cffi
Implementation of the Python Couchbase API using cffi
Assigning the issue here as suggested by Burhan Khalid on Stackoverflow: http://stackoverflow.com/questions/32063227/python-couchbase-cffi-assertionerror-backend-version-version-3
Full error text:
No module named couchbase._libcouchbase
Traceback (most recent call last):
File "app_main.py", line 75, in run_toplevel
File "runtests.py", line 12, in <module>
mod = __import__(t, globals(), locals(), ['suite'])
File "/home/travis/build/ardydedase/pycouchbase/tests/test_pycouchbase.py", line 15, in <module>
from pycouchbase.utils import *
File "/home/travis/build/ardydedase/pycouchbase/pycouchbase/__init__.py", line 11, in <module>
import couchbase_ffi as couchase
File "/home/travis/virtualenv/pypy-2.5.0/site-packages/couchbase_ffi-0.2.0.0-py2.7-linux-x86_64.egg/couchbase_ffi/__init__.py", line 50, in <module>
import couchbase_ffi._libcouchbase as _libcouchbase
File "/home/travis/virtualenv/pypy-2.5.0/site-packages/couchbase_ffi-0.2.0.0-py2.7-linux-x86_64.egg/couchbase_ffi/_libcouchbase.py", line 3, in <module>
from couchbase_ffi._cinit import get_handle
File "/home/travis/virtualenv/pypy-2.5.0/site-packages/couchbase_ffi-0.2.0.0-py2.7-linux-x86_64.egg/couchbase_ffi/_cinit.py", line 13, in <module>
ffi = FFI()
File "/home/travis/virtualenv/pypy-2.5.0/site-packages/cffi/api.py", line 59, in __init__
backend.__version__ == __version__[:3])
AssertionError
This only happens when I try to import couchbase_ffi
in the PyPy build on Travis: https://travis-ci.org/ardydedase/pycouchbase/jobs/76043402#L1663
Details:
I have this in my requirements.txt
for couchbase-python-cffi
:
cffi==0.8.0
couchbase==2.0
Looks like an incompatibility issue with the packages. But not sure where it's coming from.
I tried to install couchbase-2.2.2 and [email protected] in my PyPy environment. But the installation was failed due to an error:
$ pip install couchbase
Collecting couchbase
Using cached couchbase-2.2.2.tar.gz
Installing collected packages: couchbase
Running setup.py install for couchbase ... done
Successfully installed couchbase-2.2.2
You are using pip version 8.1.2, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
$ cd ~/couchbase-python-cffi
$ python setup.py install
Traceback (most recent call last):
File "setup.py", line 2, in <module>
import couchbase_ffi._cinit
File "/home/sub/works/couchbase-python-cffi/couchbase_ffi/__init__.py", line 51, in <module>
_libcouchbase._stage2_bootstrap()
File "/home/sub/works/couchbase-python-cffi/couchbase_ffi/_libcouchbase.py", line 78, in _stage2_bootstrap
from couchbase_ffi.bucket import Bucket
File "/home/sub/works/couchbase-python-cffi/couchbase_ffi/bucket.py", line 18, in <module>
import couchbase_ffi.executors as executors
File "/home/sub/works/couchbase-python-cffi/couchbase_ffi/executors.py", line 4, in <module>
from couchbase.exceptions import ValueFormatError, ArgumentError, CouchbaseError
File "/home/sub/env-pypy/site-packages/couchbase/exceptions.py", line 507, in <module>
class SubdocMultipleErrors(CouchbaseError):
File "/home/sub/env-pypy/site-packages/couchbase/exceptions.py", line 509, in SubdocMultipleErrors
CODE = C.LCB_SUBDOC_MULTI_FAILURE
File "/home/sub/works/couchbase-python-cffi/couchbase_ffi/__init__.py", line 46, in __getattr__
raise AttributeError(item)
AttributeError: LCB_SUBDOC_MULTI_FAILURE
My PyPy environment is:
Python 2.7.10 (5.0.1+dfsg-4, Apr 08 2016, 00:22:14)
[PyPy 5.0.1 with GCC 5.3.1 20160407]
Why Twisted will not be supported by this module?
Will installing this module break Twisted?
PyPy supports Twisted.
File "<file>", line 64, in <function>
for row in bkt.n1ql_query(query):
File "/usr/local/Cellar/pypy/2.6.1/libexec/site-packages/couchbase/n1ql.py", line 372, in __iter__
self._start()
File "/usr/local/Cellar/pypy/2.6.1/libexec/site-packages/couchbase/n1ql.py", line 312, in _start
self._mres = self._parent._n1ql_query(self._params.encoded,
AttributeError: 'Bucket' object has no attribute '_n1ql_query'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.