Thanks again!
We seem to be making progress :P
With the logger off, i get the following exception:
Traceback (most recent call last):
File "neotest.py", line 9, in <module>
neo = NeoService("foo", classpath=["neo-1.0-b8.jar",
"jta-1_1.jar"], jvm="/usr/lib/jvm/java-6-openjdk/jre/lib/amd64/server/
libjvm.so")
File "/usr/lib/python2.5/site-packages/Neo4j.py-0.1_SNAPSHOT-
py2.5.egg/neo4j/__init__.py", line 459, in __new__
neo = core.load_neo(resource_uri, params)
File "/usr/lib/python2.5/site-packages/Neo4j.py-0.1_SNAPSHOT-
py2.5.egg/neo4j/_core.py", line 128, in load_neo
log.debug("Transaction joining in effect "
AttributeError: 'NoneType' object has no attribute 'debug'
with the logger on:
classpath is: ['neo-1.0-b8.jar', 'jta-1_1.jar']
ext_dirs is: ['/usr/lib/python2.5/site-packages/Neo4j.py-0.1_SNAPSHOT-
py2.5.egg/neo4j/classes']
Trying JCC backend.
Trying JPype backend.
Using JPype backend.
Transaction joining in effect (mechanism used to discover threads).
This isn't normal is it?
On 3-Aug-09, at 6:57 PM, Tobias Ivarsson wrote:
> Thanks, that told me everything :)
>
> Fix committed to trunk. Let me know if you have any further problems.
>
> Cheers,
> Tobias
>
> On Tue, Aug 4, 2009 at 12:58 AM, Karan Bhangui <[email protected]
> >wrote:
>
>> Thanks again Tobias. Here's the output:
>> Traceback (most recent call last):
>> File
>>
>> "/usr/lib/python2.5/site-packages/Neo4j.py-0.1_SNAPSHOT-py2.5.egg/
>> neo4j/_backend/__init__.py",
>> line 45, in initialize
>> embedded, remote = implementation.initialize(classpath, params)
>> File
>>
>> "/usr/lib/python2.5/site-packages/Neo4j.py-0.1_SNAPSHOT-py2.5.egg/
>> neo4j/_backend/reflection.py",
>> line 36, in initialize
>> jvm = parameters.get('jvm', jpype.getDefaultJVMPath())
>> File "/usr/lib/python2.5/site-packages/jpype/_core.py", line 96, in
>> getDefaultJVMPath
>> return _linux.getDefaultJVMPath()
>> File "/usr/lib/python2.5/site-packages/jpype/_linux.py", line 36, in
>> getDefaultJVMPath
>> jvm = _getJVMFromJavaHome()
>> File "/usr/lib/python2.5/site-packages/jpype/_linux.py", line 55, in
>> _getJVMFromJavaHome
>> if os.path.exists(java_home+"/bin/javac") :
>> TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
>>
>> Traceback (most recent call last):
>> File "neotest.py", line 10, in <module>
>> neo = NeoService("foo", log=logger, classpath=["neo-1.0-b8.jar",
>> "jta-1_1.jar"])
>> File
>>
>> "/usr/lib/python2.5/site-packages/Neo4j.py-0.1_SNAPSHOT-py2.5.egg/
>> neo4j/__init__.py",
>> line 459, in __new__
>> neo = core.load_neo(resource_uri, params)
>> File
>>
>> "/usr/lib/python2.5/site-packages/Neo4j.py-0.1_SNAPSHOT-py2.5.egg/
>> neo4j/_core.py",
>> line 56, in load_neo
>> backend.initialize(**parameters)
>> File
>>
>> "/usr/lib/python2.5/site-packages/Neo4j.py-0.1_SNAPSHOT-py2.5.egg/
>> neo4j/_backend/__init__.py",
>> line 52, in initialize
>> raise ImportError("No applicable backend found.")
>> ImportError: No applicable backend found.
>>
>>
>> On Mon, Aug 3, 2009 at 2:07 AM, Tobias Ivarsson <
>> [email protected]> wrote:
>>
>>> You can get some more details on that error if you supply a logger
>>> to the
>>> NeoService:
>>>
>>> import logging
>>> logger = logging.getLogger('neo')
>>> logger.setLevel(logging.DEBUG)
>>> logger.addHandler(logging.StreamHandler())
>>> neo = NeoService("foo", log=logger, ...) # replace '...' with the
>>> rest of
>>> your arguments
>>>
>>> If you could give me the full output of that that would be great.
>>>
>>> Thanks,
>>> Tobias
>>>
>>> On Mon, Aug 3, 2009 at 9:39 AM, Karan Bhangui <[email protected]
>>>> wrote:
>>>
>>>> Hey Tobias,
>>>>
>>>> I finally got it working (reinstalled the neo4j.py library with a
>>>> fresh python2.5 install). What I'm having trouble with now is
>>>> running
>>>> the sample application. I've tried several combos of this:
>>>>
>>>> neo = NeoService("foo", classpath=["neo-1.0-b8.jar",
>>>> "jta-1_1.jar"])
>>>> with neo.transaction:
>>>> ref_node = neo.reference_node
>>>> new_node = neo.node()
>>>> # put operations that manipulate the node space here ...
>>>> neo.shutdown()
>>>>
>>>> I've also tried a version where I supplied the jvm path as /usr/
>>>> lib/
>>>> jvm/java-6-openjdk/jre/lib/amd64/server/libjvm.so
>>>>
>>>> However, every time I try to run it, i get:
>>>>
>>>> Traceback (most recent call last):
>>>> File "neotest.py", line 4, in <module>
>>>> neo = NeoService("foo", classpath=["neo-1.0-b8.jar",
>>>> "jta-1_1.jar"])
>>>> File "/usr/lib/python2.5/site-packages/Neo4j.py-0.1_SNAPSHOT-
>>>> py2.5.egg/neo4j/__init__.py", line 459, in __new__
>>>> neo = core.load_neo(resource_uri, params)
>>>> File "/usr/lib/python2.5/site-packages/Neo4j.py-0.1_SNAPSHOT-
>>>> py2.5.egg/neo4j/_core.py", line 56, in load_neo
>>>> backend.initialize(**parameters)
>>>> File "/usr/lib/python2.5/site-packages/Neo4j.py-0.1_SNAPSHOT-
>>>> py2.5.egg/neo4j/_backend/__init__.py", line 52, in initialize
>>>> raise ImportError("No applicable backend found.")
>>>> ImportError: No applicable backend found.
>>>>
>>>>
>>>> I've been trying to get help in #python on freenode for the past
>>>> few
>>>> hours but to no avail. I'm fairly frustrated and decided to write a
>>>> jar and just access it from python's subprocess module, but if you
>>>> know what's wrong I would appreciate it. I'd love to get this
>>>> working
>>>> with pure cpython and not try any hacks.
>>>>
>>>> Thanks,
>>>>
>>>> Karan
>>>>
>>>>
>>>> On 3-Aug-09, at 12:36 AM, Tobias Ivarsson wrote:
>>>>
>>>>> Hi Karan,
>>>>>
>>>>> ´from neo4j import NeoService´ is supposed to work, and works with
>> the
>>>>> setups I have available. Could you please provide some details
>>>>> about
>>>>> which
>>>>> version of CPython you are using and a stack trace for that
>>>>> ImportError so
>>>>> that I can try and debug this issue.
>>>>>
>>>>> Cheers,
>>>>> Tobias
>>>>>
>>>>> On Mon, Aug 3, 2009 at 6:47 AM, Karan Bhangui
>>>>> <[email protected]>wrote:
>>>>>
>>>>>> Hey guys, I'm trying to work with neo4j using python (neo4j.py
>> module
>>>>>> for CPython). I've installed JPype as a dependency and am able to
>>>>>> import the `neo4j` module in python. However, when I try from
>>>>>> neo4j
>>>>>> import NeoService, i get an ImportError. Does anyone know why?
>>>>>>
>>>>>> Thanks a ton,
>>>>>>
>>>>>> Karan
>>>>>> _______________________________________________
>>>>>> Neo mailing list
>>>>>> [email protected]
>>>>>> https://lists.neo4j.org/mailman/listinfo/user
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Tobias Ivarsson <[email protected]>
>>>>> Hacker, Neo Technology
>>>>> www.neotechnology.com
>>>>> Cellphone: +46 706 534857
>>>>> _______________________________________________
>>>>> Neo mailing list
>>>>> [email protected]
>>>>> https://lists.neo4j.org/mailman/listinfo/user
>>>>
>>>> _______________________________________________
>>>> Neo mailing list
>>>> [email protected]
>>>> https://lists.neo4j.org/mailman/listinfo/user
>>>>
>>>
>>>
>>>
>>> --
>>> Tobias Ivarsson <[email protected]>
>>> Hacker, Neo Technology
>>> www.neotechnology.com
>>> Cellphone: +46 706 534857
>>> _______________________________________________
>>> Neo mailing list
>>> [email protected]
>>> https://lists.neo4j.org/mailman/listinfo/user
>>>
>>
>>
>>
>> --
>> Karan Bhangui
>> Email: [email protected]
>> Site: http://karan.bhangui.com
>> _______________________________________________
>> Neo mailing list
>> [email protected]
>> https://lists.neo4j.org/mailman/listinfo/user
>>
>
>
>
> --
> Tobias Ivarsson <[email protected]>
> Hacker, Neo Technology
> www.neotechnology.com
> Cellphone: +46 706 534857
> _______________________________________________
> Neo mailing list
> [email protected]
> https://lists.neo4j.org/mailman/listinfo/user
_______________________________________________
Neo mailing list
[email protected]
https://lists.neo4j.org/mailman/listinfo/user