Closed espeed closed 12 years ago
Do you have any ideas? I could even let you remote on to my Machine if it would make it easier for you to diagnose the problem. It would be interesting for me to watch and see how you do it.
You're getting an error on every test that communicates with Rexster so I suspect it's a URL issue.
Rexster added /graphs/ to its URI path:
OLD: http://localhost:8182/tinkergraph NEW: http://localhost:8182/graphs/tinkergraph
The Bulbs config uses the new URL path, but try supplying the Rexster path manually:
>>> from bulbs.graph import Graph
Unable to import your local config file. Using default settings.
>>> g = Graph('http://localhost:8182/graphs/tinkergraph')
>>> g.V
If you want, email the hostname, username, and pass and I'll remote in.
The address was correct.
But.... I just reinstalled everything again (like the 5th time now!) and something has changed! g.V isn't producing that Type error anymore and I can now upload a GraphML file.... but, all the tests are all still failing. I might have to investigate further. Will let you know.
The old config had the old URL and will fail so maybe it's using the old code.
It looks like you're installing bulbs globally instead of in a virtualenv. In Python, virtualenvs are recommended for precisely this reason -- old versions conflicting with new ones.
Try setting up a virtualenv and installing bulbs in it.
`` $ mkdir /tmp/test $ cd /tmp/test $ virtualenv env $ source env/bin/activate $ git clone https://github.com/espeed/bulbs $ cd bulbs $ python setup.py install $ cd tests $ python bulbs_tests.py
Nope, still getting the same errors in the VirtualEnv (thanks for that BTW, I didn't know about VirtualEnv).
Python version okay?
Python 2.6.6 (r266:84292, Dec 26 2010, 22:31:48) [GCC 4.4.5] on linux2
Version 2.7 is recommended -- in 2.6 you get a warning, but it wasn't generating errors. You could try updating your Python version, but first try this:
edit your bulbs/bulbs/config.py and set DEBUG=True
Then run setup again in your virtual env:
$ python setup.py install
$ cd tests
$ python bulbs_tests.py
Now you should be seeing the URIs for each request. Are the URIs of the form:
Yes
Please paste the full stack trace into a Gist: http://gist.github.com
Also, just run the REST tests:
$ python rest_tests.py
Here you go
Would you mind updating the gist with the debug output too?
Done
This is weird! :)
Paste the output of these curl commands into a Gist.
$ curl -v http://localhost:8182/graphs/tinkergraph/vertices/1
$ curl -v http://localhost:8182/graphs/tinkergraph/tp/gremlin?script=g.V
It's all working fine!
I just finished updating to Python 2.7, rebooted and Bulbs is working now! You know, I don't think it has anything to do with the update. Just some ultra weirdness going on. Thanks for putting up with me. This sort of thing always happens to me!
Anyway, I've had enough for today I think. Tomorrow I've got to ask you about that execute command. A quick test still shows an error I wasn't getting several months ago on a older version of Bulbs :)
Well somehow it was able to submit data because you can see it in the Gremlin output.
Do you have simplejson installed? -- that's used to parse the response. It should get installed during setup.py, but check to make sure. If you do, then try upgrading your Python to 2.7.
import simplejson as json d = dict(name="James",age=34) json.dumps(d)
I just downgraded back to Python 2.6 just to test and see what happens and it's still working. hmmmm
Wait, I thought you meant curl is working. Are you saying you got Bulbs working???
Now I see your comment -- GitHub was slow to update.
Yes, I meant Curl then. I don't think you saw my response until after you posted yours :)
Now I updated to Python 2.7 and now Bulbs is definitely working.
Maybe it was a Python version thing, Not quite sure.
I had this issue for quite a while, and it turned out that bulbs wasn't able to authenticate against rexter. And i wasn't able to start rexter without it requiring a username and password. For quite some time it slipped me that i didn't provide any credentials when using bulbs, but finally it dawned on me :). So I tried to just hardcode them into the init of Resource: "self.http.add_credentials('user','pass')" and that worked.
But is there a better way? Somewhere I could have provided credentials? For instance when creating the Graph object?
Hi Kimbsen -
In the soon-to-be-released Bulbs 0.3, you simply include the credentials in the Config object (https://github.com/espeed/bulbs/blob/0.3.x/bulbs/config.py).
However, until 19 hours ago, Rexster didn't have an authentication feature (https://github.com/tinkerpop/rexster/issues/157) -- are you the Rexster admin?
Hi there.
Thats great news. And no, i'm not an admin. I just happened to build it from their github sources :)
Well Rexster has never had an authentication feature until yesterday, and it's not enabled by default so I have no idea why you would have to authenticate unless you were using a customized version where someone added in auth.
I checked it out the first time today as instructed here( http://bulbflow.com/download/#get-rexster ) and started it with more or less the xml config file they show here: https://github.com/tinkerpop/rexster/wiki/Rexster-Configuration. I just now realised it would start with
<authentication>none</authentication>
See https://groups.google.com/d/msg/gremlin-users/c5NTTA-WGEk/8WIUYaXSDD4J