Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have this error: KeyError: 'project.artifactId'

admmarc@fbmgrid01:~/neo4j-server/neo4j-python$ ../jython2.5.1/jython setup.py install
Traceback (most recent call last):
  File "setup.py", line 146, in <module>
    main()
  File "setup.py", line 134, in main
    args[attr] = pom[attr]
  File "/hpcdrive/homes/admmarc/neo4j-server/neo4j-python/pom.py", line 57, in __getitem__
    return self.pattern.sub(lambda match:self[match.groupdict()['var']],
  File "/hpcdrive/homes/admmarc/neo4j-server/neo4j-python/pom.py", line 57, in <lambda>
    return self.pattern.sub(lambda match:self[match.groupdict()['var']],
  File "/hpcdrive/homes/admmarc/neo4j-server/neo4j-python/pom.py", line 54, in __getitem__
    element = self.parent[path]
  File "/hpcdrive/homes/admmarc/neo4j-server/neo4j-python/pom.py", line 91, in __getitem__
    return replacement.get(path, lambda s,x:x)(self, self.__pom[path])
  File "/hpcdrive/homes/admmarc/neo4j-server/neo4j-python/pom.py", line 56, in __getitem__
    raise KeyError(path)
KeyError: 'project.artifactId'
admmarc@fbmgrid01:~/neo4j-server/neo4j-python$

My configuration for jython is as follows:

admmarc@fbmgrid01:~/neo4j-server$ jython2.5.1/bin/jython -V
Jython 2.5.1
admmarc@fbmgrid01:~/neo4j-server$ jython2.5.1/bin/jython -v
import: 'exceptions' as org.python.core.exceptions in builtin modules
import: import os # precompiled from /hpcdrive/homes/admmarc/neo4j-server/jython2.5.1/Lib/os$py.class
import: 'errno' as org.python.modules.errno in builtin modules
import: 'jarray' as org.python.modules.jarray in builtin modules
import: 'java' as java package
import: 'System' as java class
import: 'time' as org.python.modules.time.Time in builtin modules
import: import stat # precompiled from /hpcdrive/homes/admmarc/neo4j-server/jython2.5.1/Lib/stat$py.class
import: 'sys' as sys in builtin modules
import: 'File' as java class
import: 'org' as java package
import: 'FileDescriptors' as java class
import: 'FileIO' as java class
import: 'IOBase' as java class
import: 'Py' as java class
import: 'Errno' as java class
import: 'JavaPOSIX' as java class
import: 'POSIXHandler' as java class
import: 'POSIXFactory' as java class
import: import posixpath # precompiled from /hpcdrive/homes/admmarc/neo4j-server/jython2.5.1/Lib/posixpath$py.class
import: 'IOException' as java class
import: 'SecureRandom' as java class
import: 'FileDescriptor' as java class
Jython 2.5.1 (Release_2_5_1:6813, Sep 26 2009, 13:47:54)
[Java HotSpot(TM) 64-Bit Server VM (Sun Microsystems Inc.)] on java1.6.0_22
import: import site # precompiled from /hpcdrive/homes/admmarc/neo4j-server/jython2.5.1/Lib/site$py.class
Type "help", "copyright", "credits" or "license" for more information.
>>> quit()

I have setuptools installed. By now, all the components are on userspace:

admmarc@fbmgrid01:~/neo4j-server/neo4j-python$ ls -at ..
.  neo4j-python  ..  jython2.5.1  jdk1.6.0_23  neo4j-1.2  neo4j-1.2-unix.tar.gz  ez_setup.py  jdk-6u23-linux-x64.bin  jython_installer-2.5.1.jar
admmarc@fbmgrid01:~/neo4j-server/neo4j-python$

The box is an Ubuntu 9.10 x64.

And this is it, any help will be welcome, as questions will also be very welcome. I can do almost whatever test is needed to be done.

Thanks.

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

Try this solution, edit pom.py:

if element is None: # added
    element = self.tree.findtext(self.__path('dependencies')) # added
if element is None:
    raise KeyError(path)
share|improve this answer
    
You got the point. Many thanks. –  marc.riera Feb 9 '11 at 12:33
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.