commonsense / conceptnet5

Code for building ConceptNet from raw data.
Other
2.76k stars 352 forks source link

SQL Error #34

Closed evilsizord closed 7 years ago

evilsizord commented 9 years ago

I'm getting an SQL Error when I try to query a concept ending with "/."

Apparently this causing 500 internal server error on the API. For example: http://conceptnet-api-1.media.mit.edu/data/5.3/search?rel=/r/IsA&end=/c/en/land/.&limit=20

I believe the offending line is https://github.com/commonsense/conceptnet5/blob/master/conceptnet5/formats/sql.py#L228

And for me it was fixed by putting 'true' in quotes.

roytseng-tw commented 8 years ago

I encounter the same error with this functionality "/.", too. I solve it by changing conceptnet5/formats/sql.py 's complete_req sql string: true -> 1

ashutshar commented 7 years ago

Anyone found the solution for this?

rspeer commented 7 years ago

Both of the suggested solutions work. I've been distracted by being knee-deep in new database code, but that doesn't mean I shouldn't fix the old code.

I've made the suggested change on the version5.4 branch.