orientechnologies / pyorient

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

[ exception_message.decode( 'utf8' ) ] PyOrientCommandException: - #36

Open sawantsaurabh opened 4 years ago

sawantsaurabh commented 4 years ago

After connecting and creating session id sucessfully. I tried to insert data into database but got following error after running inserting record: " [ exception_message.decode( 'utf8' ) ] PyOrientCommandException: - "

Python Version: 3.7.0 pyorient : 1.5.5

Please find my below code. `import pyorient client = pyorient.OrientDB("localhost", 2424) client.set_session_token(True) session_id = client.connect( "root", "orientdb")

client.db_create('yourDB', pyorient.DB_TYPE_GRAPH,pyorient.STORAGE_TYPE_PLOCAL) client.db_open('yourDB', 'root', 'orientdb', pyorient.DB_TYPE_GRAPH)

cluster_id = client.command( "create class my_class extends V" )

create property

cluster_id = client.command( "create property my_class.id Integer" ) cluster_id = client.command( "create property my_class.name String" )

insert record

client.command("insert into my_class ( 'id','name' ) values( 1201, 'satish')") `

Amioplk commented 3 years ago

I have the same issue. Any idea on how to pass over it / fix it ?

brucetony commented 3 years ago

I was able to patch the library to work with OrientDB 3.1+ and updated the README to give descriptions of how to connect to your database now. You can find my patched version here: https://github.com/brucetony/pyorient