getting neo4j support with bzr

Problems with getting it running
Post Reply [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
User avatar
rotten
Posts:34
Joined:27 Aug 2010 14:42
Location:Columbus, Ohio
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
getting neo4j support with bzr

Post by rotten » 27 Aug 2010 14:57

In order to be able to play with the new Neo4j-Gephi interface I've installed bzr on two different (Solaris) systems. One with Python 2.4.4 and one with Python 2.7. When I run the command suggested on http://news.neo4j.org/2010/08/neo4j-vis ... 4j+News%29 it doesn't work...

On my system with Python 2.4.4:


$ bzr checkout lp:~bujacik/gephi/support-for-neo4j
bzr: ERROR: exceptions.AttributeError: 'module' object has no attribute 'ssl'

Traceback (most recent call last):
File "/usr/local/lib/python2.4/site-packages/bzrlib/commands.py", line 911, in exception_to_return_code
return the_callable(*args, **kwargs)
File "/usr/local/lib/python2.4/site-packages/bzrlib/commands.py", line 1111, in run_bzr
ret = run(*run_argv)
File "/usr/local/lib/python2.4/site-packages/bzrlib/commands.py", line 689, in run_argv_aliases
return self.run(**all_cmd_args)
File "/usr/local/lib/python2.4/site-packages/bzrlib/commands.py", line 704, in run
return self._operation.run_simple(*args, **kwargs)
File "/usr/local/lib/python2.4/site-packages/bzrlib/cleanup.py", line 134, in run_simple
return _do_with_cleanups(
File "/usr/local/lib/python2.4/site-packages/bzrlib/cleanup.py", line 165, in _do_with_cleanups
result = func(*args, **kwargs)
File "/usr/local/lib/python2.4/site-packages/bzrlib/builtins.py", line 1320, in run
accelerator_tree, source = bzrdir.BzrDir.open_tree_or_branch(
File "/usr/local/lib/python2.4/site-packages/bzrlib/bzrdir.py", line 1032, in open_tree_or_branch
bzrdir = klass.open(location)
File "/usr/local/lib/python2.4/site-packages/bzrlib/bzrdir.py", line 910, in open
t = get_transport(base, possible_transports=possible_transports)
File "/usr/local/lib/python2.4/site-packages/bzrlib/lazy_import.py", line 125, in __call__
return obj(*args, **kwargs)
File "/usr/local/lib/python2.4/site-packages/bzrlib/transport/__init__.py", line 1569, in get_transport
base = directories.dereference(base)
File "/usr/local/lib/python2.4/site-packages/bzrlib/directory_service.py", line 58, in dereference
return service().look_up(name, url)
File "/usr/local/lib/python2.4/site-packages/bzrlib/plugins/launchpad/lp_directory.py", line 59, in look_up
return self._resolve(url)
File "/usr/local/lib/python2.4/site-packages/bzrlib/plugins/launchpad/lp_directory.py", line 69, in _resolve
result = resolve.submit(service)
File "/usr/local/lib/python2.4/site-packages/bzrlib/plugins/launchpad/lp_registration.py", line 272, in submit
self._authenticated)
File "/usr/local/lib/python2.4/site-packages/bzrlib/plugins/launchpad/lp_registration.py", line 195, in send_request
result = method(*method_params)
File "/usr/local/lib/python2.4/xmlrpclib.py", line 1096, in __call__
return self.__send(self.__name, args)
File "/usr/local/lib/python2.4/xmlrpclib.py", line 1383, in __request
verbose=self.__verbose
File "/usr/local/lib/python2.4/site-packages/bzrlib/plugins/launchpad/lp_registration.py", line 74, in request
response = self._opener.open(request)
File "/usr/local/lib/python2.4/urllib2.py", line 358, in open
response = self._open(req, data)
File "/usr/local/lib/python2.4/urllib2.py", line 376, in _open
'_open', req)
File "/usr/local/lib/python2.4/urllib2.py", line 337, in _call_chain
result = func(*args)
File "/usr/local/lib/python2.4/site-packages/bzrlib/transport/http/_urllib2_wrappers.py", line 727, in https_open
return self.do_open(HTTPSConnection, request)
File "/usr/local/lib/python2.4/site-packages/bzrlib/transport/http/_urllib2_wrappers.py", line 621, in do_open
headers)
File "/usr/local/lib/python2.4/httplib.py", line 827, in _send_request
self.endheaders()
File "/usr/local/lib/python2.4/httplib.py", line 798, in endheaders
self._send_output()
File "/usr/local/lib/python2.4/httplib.py", line 679, in _send_output
self.send(msg)
File "/usr/local/lib/python2.4/httplib.py", line 646, in send
self.connect()
File "/usr/local/lib/python2.4/site-packages/bzrlib/transport/http/_urllib2_wrappers.py", line 321, in connect
self.connect_to_origin()
File "/usr/local/lib/python2.4/site-packages/bzrlib/transport/http/_urllib2_wrappers.py", line 324, in connect_to_origin
ssl_sock = _ssl_wrap_socket(self.sock, self.key_file, self.cert_file)
File "/usr/local/lib/python2.4/site-packages/bzrlib/transport/http/_urllib2_wrappers.py", line 300, in _ssl_wrap_socket
ssl_sock = socket.ssl(sock, key_file, cert_file)
AttributeError: 'module' object has no attribute 'ssl'

bzr 2.2.0 on python 2.4.4 (Solaris-2.11-i86pc-i386-32bit-ELF)
arguments: ['/usr/local/bin/bzr', 'checkout', 'lp:~bujacik/gephi/support-for-neo4j']
encoding: '646', fsenc: '646', lang: None
plugins:
bash_completion /usr/local/lib/python2.4/site-packages/bzrlib/plugins/bash_completion [2.2.0]
launchpad /usr/local/lib/python2.4/site-packages/bzrlib/plugins/launchpad [2.2.0]
netrc_credential_store /usr/local/lib/python2.4/site-packages/bzrlib/plugins/netrc_credential_store [2.2.0]
news_merge /usr/local/lib/python2.4/site-packages/bzrlib/plugins/news_merge [2.2.0]

*** Bazaar has encountered an internal error. This probably indicates a
bug in Bazaar. You can help us fix it by filing a bug report at
https://bugs.launchpad.net/bzr/+filebug



On my system with 2.7:


$ bzr checkout lp:~bujacik/gephi/support-for-neo4j
bzr: ERROR: exceptions.AttributeError: 'module' object has no attribute 'HTTPSConnection'

Traceback (most recent call last):
File "/home/rotten/lib/python/bzrlib/commands.py", line 911, in exception_to_return_code
return the_callable(*args, **kwargs)
File "/home/rotten/lib/python/bzrlib/commands.py", line 1111, in run_bzr
ret = run(*run_argv)
File "/home/rotten/lib/python/bzrlib/commands.py", line 689, in run_argv_aliases
return self.run(**all_cmd_args)
File "/home/rotten/lib/python/bzrlib/commands.py", line 704, in run
return self._operation.run_simple(*args, **kwargs)
File "/home/rotten/lib/python/bzrlib/cleanup.py", line 135, in run_simple
self.cleanups, self.func, *args, **kwargs)
File "/home/rotten/lib/python/bzrlib/cleanup.py", line 165, in _do_with_cleanups
result = func(*args, **kwargs)
File "/home/rotten/lib/python/bzrlib/builtins.py", line 1321, in run
branch_location)
File "/home/rotten/lib/python/bzrlib/bzrdir.py", line 1032, in open_tree_or_branch
bzrdir = klass.open(location)
File "/home/rzo29/lib/python/bzrlib/bzrdir.py", line 910, in open
t = get_transport(base, possible_transports=possible_transports)
File "/home/rotten/lib/python/bzrlib/lazy_import.py", line 125, in __call__
return obj(*args, **kwargs)
File "/home/rotten/lib/python/bzrlib/transport/__init__.py", line 1569, in get_transport
base = directories.dereference(base)
File "/home/rotten/lib/python/bzrlib/directory_service.py", line 54, in dereference
match = self.get_prefix(url)
File "/home/rotten/lib/python/bzrlib/registry.py", line 184, in get_prefix
return self.get(key), fullname[len(key):]
File "/home/rotten/lib/python/bzrlib/registry.py", line 173, in get
return self._dict[self._get_key_or_default(key)].get_obj()
File "/home/rzo29/lib/python/bzrlib/registry.py", line 61, in get_obj
self._do_import()
File "/home/rotten/lib/python/bzrlib/registry.py", line 70, in _do_import
obj = __import__(self._module_name, globals(), locals(), names)
File "/home/rotten/lib/python/bzrlib/plugins/launchpad/lp_directory.py", line 33, in <module>
from bzrlib.plugins.launchpad.lp_registration import (
File "/home/rotten/lib/python/bzrlib/plugins/launchpad/lp_registration.py", line 30, in <module>
from bzrlib.transport.http import _urllib2_wrappers
File "/home/rotten/lib/python/bzrlib/transport/http/_urllib2_wrappers.py", line 304, in <module>
class HTTPSConnection(AbstractHTTPConnection, httplib.HTTPSConnection):

AttributeError: 'module' object has no attribute 'HTTPSConnection'

bzr 2.2.0 on python 2.7.0 (Solaris-2.10-sun4u-sparc-32bit-ELF)
arguments: ['/home/rotten/bin/bzr', 'checkout', 'lp:~bujacik/gephi/support-for-neo4j']
encoding: '646', fsenc: '646', lang: None
plugins:
bash_completion /home/rotten/lib/python/bzrlib/plugins/bash_completion [2.2.0]
launchpad /home/rotten/lib/python/bzrlib/plugins/launchpad [2.2.0]
netrc_credential_store /home/rotten/lib/python/bzrlib/plugins/netrc_credential_store [2.2.0]
news_merge /home/rotten/lib/python/bzrlib/plugins/news_merge [2.2.0]

*** Bazaar has encountered an internal error. This probably indicates a
bug in Bazaar. You can help us fix it by filing a bug report at
https://bugs.launchpad.net/bzr/+filebug
including this traceback and a description of the problem.


It appears I'm missing some bzr prerequisite python module (or two or some other setup) surrounding https/ssl client code to support the checkout command. Suggestions for how to meet these prerequisites? Glancing at the bzr documentation and the gephi documentation, nothing jumped out at me for fixing this.

admin
Gephi Community Manager
Posts:964
Joined:09 Dec 2009 14:41
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: getting neo4j support with bzr

Post by admin » 27 Aug 2010 20:17

Hi,

You should find some support on this specific issue on Bazaar mailing-list or bug tracker. It seems to be related with this bug.

Or something related with openSSL.

User avatar
rotten
Posts:34
Joined:27 Aug 2010 14:42
Location:Columbus, Ohio
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: getting neo4j support with bzr

Post by rotten » 27 Aug 2010 22:51

I was able to rebuild python to include the ssl module. That got me past that error.

This is what got me through that hurdle:
1) configure
2) edit Modules/Setup (to enable SSL)
3) run make TWICE
4) edit setup.py
5) run make again (to fix the paths to the openssl includes and libraries)

bzr is throwing a new error now.

AttributeError: addinfourl instance has no attribute 'getheader'

I'll keep plugging away at it. I'm really eager to try the neo4j integration with Gephi.

User avatar
rotten
Posts:34
Joined:27 Aug 2010 14:42
Location:Columbus, Ohio
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: getting neo4j support with bzr

Post by rotten » 31 Aug 2010 14:32

FWIW, after fixing that SSL issue, I ran into this bug:
https://bugs.launchpad.net/bzr/+bug/612096

I tried their suggested patch. It didn't help.

I tried installing bzr with Python2.5 and ran into new errors with it. I gave up. It broke my Python 2.7 installation, which I now have to fix so my other Python scripts will work again.

Does anyone know of some other way to grab this Gephi plugin? http? svn? git? ftp? gopher?

User avatar
rotten
Posts:34
Joined:27 Aug 2010 14:42
Location:Columbus, Ohio
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: getting neo4j support with bzr

Post by rotten » 01 Sep 2010 02:49

I was able to get on an Ubuntu machine with enough privileges to grab Bazaar via Synaptic Package Manager. This worked and I could set up the neo4j gephi plugin. I look forward to giving it a whirl (finally).

Post Reply
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable