Could you post a section of Python code that includes a CREATE statement
that fails for you?

Incidentally, you would be better off using Cypher parameters (passed in
the *execute* method) than the Python level % substitution you have here.
This will improve both performance and reliability with "odd" characters.
On this subject, do your properties contain ' marks? This could be breaking
the query.

Nige


On 19 May 2014 15:04, Александр Богданов <lanakramo...@gmail.com> wrote:

> *CREATE (n:person {name:'%s', nickname:'%s', md5:'%s'})*
> %s - strings
>
> воскресенье, 18 мая 2014 г., 15:39:45 UTC+4 пользователь Michael Hunger
> написал:
>>
>> Can you show your delete and create statements?
>>
>> You should probably also use parameters for your id *WHERE ID(p)={id}*
>>
>>
>> On Sat, May 17, 2014 at 3:31 PM, Александр Богданов 
>> <lanakr...@gmail.com>wrote:
>>
>>> Hello.
>>>
>>> Problems with writing to database from python script.
>>>
>>> Opening session:
>>> *self.session = cypher.Session(http://localhost:7474
>>> <http://localhost:7474>)*
>>>
>>> query like this:
>>> *self.session.execute("MATCH (p:person)-[:has_a_role]-(role) WHERE
>>> ID(p)=%d RETURN role.role") *
>>> working well. I receiving all information i need.
>>>
>>> but if i trying to create node or delete it doesnt work.
>>> no errors
>>> even correct node in return of execute() function if i trying to create
>>> it. but no such node in response on query like *self.session.execute("MATCH
>>> (n) RETURN n")*
>>> and in http://127.0.0.1:7474/browser/ no such node too. but if i trying
>>> in browser - it creates.
>>>
>>> something with configuration? why can't i correctly use write-queries
>>> with *py2neo.cypher.Session.execute()* ?
>>>
>>> PS: Sorry for my english and thank you.
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Neo4j" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to neo4j+un...@googlegroups.com.
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "Neo4j" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to neo4j+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to