no /begin endpoint
Closed this issue · 1 comments
Hi there,
I was trying to interact with the engine through command line. I tried to call the APIs using the python binding. However, when I begin a session, but it seems not to be able to find the /begin endpoints. The code and error messages are as follows:
`import json
import requests
h = httplib2.Http()
URL = "http://localhost:9000/CAL/"
data = {'session_id': '0001',
'seed_query': 'prepay',
'async': True,
'mode': 'doc',
'judgments_per_iteration': 1}
resp = requests.post(url = URL+'begin/', data=data)
print(resp.text)`
`
<title>Page not found at /CAL/begin/</title> <style type="text/css"> html * { padding:0; margin:0; } body * { padding:10px 20px; } body * * { padding:0; } body { font:small sans-serif; background:#eee; } body>div { border-bottom:1px solid #ddd; } h1 { font-weight:normal; margin-bottom:.4em; } h1 span { font-size:60%; color:#666; font-weight:normal; } table { border:none; border-collapse: collapse; width:100%; } td, th { vertical-align:top; padding:2px 3px; } th { width:12em; text-align:right; color:#666; padding-right:.5em; } #info { background:#f6f6f6; } #info ol { margin: 0.5em 4em; } #info ol li { font-family: monospace; } #summary { background: #ffc; } #explanation { background:#eee; border-bottom: 0px none; } </style>Page not found (404)
</table>
<p>
Using the URLconf defined in <code>config.urls</code>,
Django tried these URL patterns, in this order:
</p>
<ol>
<li>
^
^$
[name='home']
</li>
<li>
^
^sessions/$
[name='sessions']
</li>
<li>
^
^practice/$
[name='practice']
</li>
<li>
^
^practice_complete/$
[name='practice_complete']
</li>
<li>
^
^post_ctrlf/$
[name='post_ctrlf']
</li>
<li>
^
^post_find_keystroke/$
[name='post_find_keystroke']
</li>
<li>
^
^post_visit/$
[name='post_visit']
</li>
<li>
^
^post_log/$
[name='post_log_msg']
</li>
<li>
^
^get_session_details/$
[name='get_session_details']
</li>
<li>
^about/$
[name='about']
</li>
<li>
^admin/
</li>
<li>
^users/
</li>
<li>
^accounts/
</li>
<li>
^CAL/
^$
[name='main']
</li>
<li>
^CAL/
^post_log/$
[name='post_log_msg']
</li>
<li>
^CAL/
^get_docs/$
[name='get_docs']
</li>
<li>
^iterative/
</li>
<li>
^search/
</li>
<li>
^topic/
</li>
<li>
^judgment/
</li>
<li>
^media\/(?P<path>.*)$
</li>
<li>
^400/$
</li>
<li>
^403/$
</li>
<li>
^404/$
</li>
<li>
^500/$
</li>
</ol>
<p>The current URL, <code>CAL/begin/</code>, didn't match any of these.</p>
You're seeing this error because you have DEBUG = True
in
your Django settings file. Change that to False
, and Django
will display a standard 404 page.
Request Method: | GET |
---|---|
Request URL: | http://localhost:9000/CAL/begin/ |
It worked when I changed the URL to "http://localhost:9001/CAL"