orientechnologies / pyorient

OrientDB driver for Python that uses the binary protocol.
Apache License 2.0
119 stars 38 forks source link

AttributeError: 'tuple' object has no attribute 'major' #1

Closed tansydev closed 9 years ago

tansydev commented 9 years ago

Hi I'm using python2.6.6 on centos6.6.

after install pyorient, i found error message.

client = pyorient.OrientDB("localhost",2424) session_id = client.connect("admin","admin") Traceback (most recent call last): File "", line 1, in File "pyorient/orient.py", line 209, in connect .prepare(args).send().fetch_response() File "pyorient/messages/connection.py", line 54, in prepare return super( ConnectMessage, self ).prepare() File "pyorient/messages/base.py", line 119, in prepare self._encode_field( x ) for x in self._fields_definition File "pyorient/messages/base.py", line 119, in self._encode_field( x ) for x in self._fields_definition File "pyorient/messages/base.py", line 279, in _encode_field if sys.version_info.major >= 3: AttributeError: 'tuple' object has no attribute 'major'

tansydev commented 9 years ago

Hi. I think pyorient supports only python 3.X. because, memoryview(buf) in orient.py supports only python3.x. is it correct?

Ostico commented 9 years ago

Hi @tansydev , Pyorient at moment supports only python 2.7.x-3.x I think this issue depends on the package sys.

In python < 2.7 , sys.version_info was a tuple, in python >= 2.7 it is a dict.

This should noto ne hard to fix.

tansydev commented 9 years ago

hi thank you for your reply. i think so that my python version 2.6.6. please, close my issue๐Ÿ˜€

2015๋…„ 5์›” 3์ผ (์ผ) ์˜คํ›„ 10:20, Domenico Lupinetti notifications@github.com๋‹˜์ด ์ž‘์„ฑ:

Hi @tansydev https://github.com/tansydev , Pyorient at moment supports only python 2.7.x-3. I think this issue depends on the package sys.

In python < 2.7 , sys.version_info was a tuple, in python >= 2.7 it is a dict.

โ€” Reply to this email directly or view it on GitHub https://github.com/orientechnologies/pyorient/issues/1#issuecomment-98480532 .

Ostico commented 9 years ago

Moved here: https://github.com/mogui/pyorient/issues/67