I tried adding C:\Python27\Lib\site-packages\neo4j\javalib to sys.path but
that didn't work, see below.
I am running python 2.7 on win xp I installed
neo4j-embedded-1.5.dev104.win32.exe


>>> import neo4j

Traceback (most recent call last):
  File "&lt;pyshell#0&gt;", line 1, in <module>
    import neo4j
  File "C:\Python27\lib\site-packages\neo4j\__init__.py", line 29, in
<module>
    from neo4j.core import GraphDatabase, Direction, NotFoundException,
BOTH, ANY, INCOMING, OUTGOING
  File "C:\Python27\lib\site-packages\neo4j\core.py", line 27, in <module>
    GraphDatabase = extends(GraphDatabaseService)
  File "C:\Python27\lib\site-packages\neo4j\_backend.py", line 43, in
extends
    return ParentClass(getattr(CLASS,'__name__','Class'),(),{})
  File "C:\Python27\lib\site-packages\neo4j\_backend.py", line 34, in
__new__
    return type.__new__(Class, name, (object,), body)
TypeError: type() argument 1 must be string, not JPackage

>>> import sys

>>> print sys.path
['C:\\Python27\\Lib\\idlelib',
'C:\\Python27\\lib\\site-packages\\zodb3-3.10.3-py2.7-win32.egg',
'C:\\Python27\\lib\\site-packages\\zope.interface-3.8.0-py2.7-win32.egg',
'C:\\Python27\\lib\\site-packages\\zope.event-3.5.1-py2.7.egg',
'C:\\Python27\\lib\\site-packages\\zdaemon-2.0.4-py2.7.egg',
'C:\\Python27\\lib\\site-packages\\zconfig-2.9.0-py2.7.egg',
'C:\\Python27\\lib\\site-packages\\zc.lockfile-1.0.0-py2.7.egg',
'C:\\Python27\\lib\\site-packages\\transaction-1.1.1-py2.7.egg',
'C:\\WINDOWS\\system32\\python27.zip', 'C:\\Python27\\DLLs',
'C:\\Python27\\lib', 'C:\\Python27\\lib\\plat-win',
'C:\\Python27\\lib\\lib-tk', 'C:\\Python27',
'C:\\Python27\\lib\\site-packages', 'C:\\Python27\\lib\\site-packages\\PIL',
'C:\\Python27\\lib\\site-packages\\win32',
'C:\\Python27\\lib\\site-packages\\win32\\lib',
'C:\\Python27\\lib\\site-packages\\Pythonwin']

>>> sys.path.append('C:\Python27\Lib\site-packages\neo4j\javalib')

>>> print sys.path
['C:\\Python27\\Lib\\idlelib',
'C:\\Python27\\lib\\site-packages\\zodb3-3.10.3-py2.7-win32.egg',
'C:\\Python27\\lib\\site-packages\\zope.interface-3.8.0-py2.7-win32.egg',
'C:\\Python27\\lib\\site-packages\\zope.event-3.5.1-py2.7.egg',
'C:\\Python27\\lib\\site-packages\\zdaemon-2.0.4-py2.7.egg',
'C:\\Python27\\lib\\site-packages\\zconfig-2.9.0-py2.7.egg',
'C:\\Python27\\lib\\site-packages\\zc.lockfile-1.0.0-py2.7.egg',
'C:\\Python27\\lib\\site-packages\\transaction-1.1.1-py2.7.egg',
'C:\\WINDOWS\\system32\\python27.zip', 'C:\\Python27\\DLLs',
'C:\\Python27\\lib', 'C:\\Python27\\lib\\plat-win',
'C:\\Python27\\lib\\lib-tk', 'C:\\Python27',
'C:\\Python27\\lib\\site-packages', 'C:\\Python27\\lib\\site-packages\\PIL',
'C:\\Python27\\lib\\site-packages\\win32',
'C:\\Python27\\lib\\site-packages\\win32\\lib',
'C:\\Python27\\lib\\site-packages\\Pythonwin',
'C:\\Python27\\Lib\\site-packages\\neo4j\\javalib']

>>> sys.path.append('C:\\Python27\\Lib\\site-packages\\neo4j\\javalib')

>>> import neo4j

Traceback (most recent call last):
  File "&lt;pyshell#8&gt;", line 1, in <module>
    import neo4j
  File "C:\Python27\lib\site-packages\neo4j\__init__.py", line 29, in
<module>
    from neo4j.core import GraphDatabase, Direction, NotFoundException,
BOTH, ANY, INCOMING, OUTGOING
  File "C:\Python27\lib\site-packages\neo4j\core.py", line 27, in <module>
    GraphDatabase = extends(GraphDatabaseService)
  File "C:\Python27\lib\site-packages\neo4j\_backend.py", line 43, in
extends
    return ParentClass(getattr(CLASS,'__name__','Class'),(),{})
  File "C:\Python27\lib\site-packages\neo4j\_backend.py", line 34, in
__new__
    return type.__new__(Class, name, (object,), body)
TypeError: type() argument 1 must be string, not JPackage


Jacob Hansson-2 wrote:
> 
> Hmm, I think the error you are getting is the result of neo4j-embedded not
> finding java jars that it needs (I'll add it to the backlog to add an
> explicit check for that, rather than failing like this).
> 
> Normally, neo4j-embedded will set its classpath itself, pointing to the
> java
> jars it comes bundled with. However, it is possible to override this, by
> setting the environment variable "CLASSPATH" to some value. Could you
> check
> if this is the case?
> 
> If not, please let me know what platform you are running, and what version
> of neo4j-embedded you have installed, and I'll dig deeper into it.
> 
> Oh, and I'll make a note that the environment var needs to be changed to
> something more specific.
> 
> /Jake
> 
> On Thu, Sep 22, 2011 at 1:46 PM, bmeagle &lt;dewald.piete...@gmail.com&gt;
> wrote:
> 
>> Hi all,
>>
>> Decided to give neo4j via python a try but alas:
>>
>> from neo4j import GraphDatabase
>>
>> Traceback (most recent call last):
>>  File "&lt;pyshell#1&gt;", line 1, in <module>
>>    from neo4j import GraphDatabase
>>  File "C:\Python27\lib\site-packages\neo4j\__init__.py", line 29, in
>> <module>
>>    from neo4j.core import GraphDatabase, Direction, NotFoundException,
>> BOTH, ANY, INCOMING, OUTGOING
>>  File "C:\Python27\lib\site-packages\neo4j\core.py", line 27, in <module>
>>    GraphDatabase = extends(GraphDatabaseService)
>>  File "C:\Python27\lib\site-packages\neo4j\_backend.py", line 43, in
>> extends
>>    return ParentClass(getattr(CLASS,'__name__','Class'),(),{})
>>  File "C:\Python27\lib\site-packages\neo4j\_backend.py", line 34, in
>> __new__
>>    return type.__new__(Class, name, (object,), body)
>> TypeError: type() argument 1 must be string, not JPackage
>>
>> I am using winxp I installed neo4j-embedded-1.5.dev104.win32.exe and I am
>> using python 2.7
>>
>> Regards
>> bmeagle
>>
>> --
>> View this message in context:
>> http://neo4j-community-discussions.438527.n3.nabble.com/neo4j-python-import-error-tp3358482p3358482.html
>> Sent from the Neo4j Community Discussions mailing list archive at
>> Nabble.com.
>> _______________________________________________
>> Neo4j mailing list
>> User@lists.neo4j.org
>> https://lists.neo4j.org/mailman/listinfo/user
>>
> 
> 
> 
> -- 
> Jacob Hansson
> Phone: +46 (0) 763503395
> Twitter: @jakewins
> _______________________________________________
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
> 


--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/neo4j-python-import-error-tp3358482p3358601.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
_______________________________________________
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to