Skip to Main Content

Python driver 'invalid syntax' with Python 2.6

Christos Iraklis TsatsoulisFeb 2 2017 — edited Feb 6 2017

Hi all,

I am trying out the Python driver for Oracle NoSQL, following the example script from the documentation, but I am getting an 'invalid syntax' error when trying to import the necessary modules in Python 2.6:

[oracle@bigdatalite ~]$ python

Python 2.6.6 (r266:84292, Aug 18 2016, 08:36:59)

[GCC 4.4.7 20120313 (Red Hat 4.4.7-17)] on linux2

Type "help", "copyright", "credits" or "license" for more information.

>>> from nosqldb import ConnectionException

Traceback (most recent call last):

  File "<stdin>", line 1, in <module>

  File "/usr/lib/python2.6/site-packages/nosqldb/", line 53, in <module>

    from nosqldb import Consistency

  File "/usr/lib/python2.6/site-packages/nosqldb/", line 1289

    _time_consistency_allowed_keys = {ONDB_PERMISSIBLE_LAG, ONDB_TIMEOUT}


SyntaxError: invalid syntax

with the exact same error when trying to import Factory & StoreConfig.

I have successfully installed the nosqldb 4.3.10 Python package using pip.

The error does not appear in Python 2.7.6.

According to the documentation, the nosqldb Python package is compatible with both Python 2.6 & 2.7.

Any ideas?

Many thanks in advance.

This post has been answered by Anand Chandak-Oracle on Feb 6 2017
Jump to Answer
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked due to inactivity on Mar 6 2017
Added on Feb 2 2017