rsoscia / BAMS-to-NeuroLex

Some scripts to adapt the content from brain architecture management system (BAMS) into a form that can be shared on NeuroLex.org
MIT License
1 stars 1 forks source link

Run a more complex rdflib example #2

Closed slarson closed 11 years ago

slarson commented 11 years ago

Run the second example here and verify that it works. Save the script into the src directory and give it a name.

rsoscia commented 11 years ago

took me forever to figure out i had to install the rdfextras... now trying to run the example, but keep getting an indexing error.. working on it:

"Ryans-MacBook-Pro-2:src ryansoscia$ python HelloWorld2.py Traceback (most recent call last): File "HelloWorld2.py", line 29, in print("Definition: %s" % qres.result[0]) IndexError: list index out of range"

slarson commented 11 years ago

Good practical education, even just running examples, no?

Here's a link that may help. Got it via Google. The more you rely on Google to get you through, the better :)

http://stackoverflow.com/questions/16005707/index-error-list-index-out-of-range-python

On Tue, Sep 17, 2013 at 11:16 PM, rsoscia notifications@github.com wrote:

took me forever to figure out i had to install the rdfextras... now trying to run the example, but keep getting an indexing error.. working on it:

"Ryans-MacBook-Pro-2:src ryansoscia$ python HelloWorld2.py Traceback (most recent call last): File "HelloWorld2.py", line 29, in print("Definition: %s" % qres.result[0]) IndexError: list index out of range"

— Reply to this email directly or view it on GitHubhttps://github.com/rsoscia/BAMS-to-NeuroLex/issues/2#issuecomment-24643186 .

slarson commented 11 years ago

Just realized that the larger problem is likely to be that qres doesn't have anything in it. May mean that for some reason the SPARQL query is not returning any results. If you still can't get it to work tomorrow write back and let me know and I'll try running it.

On Wed, Sep 18, 2013 at 12:07 AM, Stephen Larson stephen.larson@gmail.comwrote:

Good practical education, even just running examples, no?

Here's a link that may help. Got it via Google. The more you rely on Google to get you through, the better :)

http://stackoverflow.com/questions/16005707/index-error-list-index-out-of-range-python

On Tue, Sep 17, 2013 at 11:16 PM, rsoscia notifications@github.comwrote:

took me forever to figure out i had to install the rdfextras... now trying to run the example, but keep getting an indexing error.. working on it:

"Ryans-MacBook-Pro-2:src ryansoscia$ python HelloWorld2.py Traceback (most recent call last): File "HelloWorld2.py", line 29, in print("Definition: %s" % qres.result[0]) IndexError: list index out of range"

— Reply to this email directly or view it on GitHubhttps://github.com/rsoscia/BAMS-to-NeuroLex/issues/2#issuecomment-24643186 .