Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while trying to train #7

Open
MrThiago opened this issue May 5, 2017 · 5 comments
Open

Error while trying to train #7

MrThiago opened this issue May 5, 2017 · 5 comments

Comments

@MrThiago
Copy link

MrThiago commented May 5, 2017

{"message": "JSON parse error - Expecting property name enclosed in double quotes: line 1 column 2 (char 1)"}

@akash9182
Copy link

I have the same issue. As I am using flask for the first time I am not familiar with the error.

@akash9182
Copy link

akash9182 commented Jun 29, 2017

I resolved this issue
There is typo in

curl -X GET -H "X-API-TOKEN: FOOBAR1" -H "Content-Type: application/json; charset=utf-8" http://127.0.0.1:5000/train -d "{"data-url": "sample-data.csv"}"

change to

 curl -X GET -H "X-API-TOKEN: FOOBAR1" -H "Content-Type: application/json; charset=utf-8" http://127.0.0.1:5000/train -d '{"data-url": "sample-data.csv"}'

@Prathima1007799
Copy link

I am getting the 'dict' object is not callable while train and 'list ' object is not callable while predicting. the error looks like the below.
app_rv = app(environ, start_response)
TypeError: 'dict' object is not callable

complete error

127.0.0.1 - - [13/Feb/2018 20:14:15] "GET /train HTTP/1.1" 500 -
Traceback (most recent call last):
File "C:\ContentBasedRecommender2\anaconda2\lib\site-packages\flask\app.py", line 1997, in call
return self.wsgi_app(environ, start_response)
File "C:\ContentBasedRecommender2\anaconda2\lib\site-packages\flask\app.py", line 1985, in wsgi_app
response = self.handle_exception(e)
File "C:\ContentBasedRecommender2\anaconda2\lib\site-packages\flask\app.py", line 1540, in handle_exception
reraise(exc_type, exc_value, tb)
File "C:\ContentBasedRecommender2\anaconda2\lib\site-packages\flask\app.py", line 1982, in wsgi_app
response = self.full_dispatch_request()
File "C:\ContentBasedRecommender2\anaconda2\lib\site-packages\flask\app.py", line 1615, in full_dispatch_request
return self.finalize_request(rv)
File "C:\ContentBasedRecommender2\anaconda2\lib\site-packages\flask\app.py", line 1630, in finalize_request
response = self.make_response(rv)
File "C:\ContentBasedRecommender2\anaconda2\lib\site-packages\flask\app.py", line 1740, in make_response
rv = self.response_class.force_type(rv, request.environ)
File "C:\ContentBasedRecommender2\anaconda2\lib\site-packages\werkzeug\wrappers.py", line 885, in force_type
response = BaseResponse(*_run_wsgi_app(response, environ))
File "C:\ContentBasedRecommender2\anaconda2\lib\site-packages\werkzeug\wrappers.py", line 57, in _run_wsgi_app
return _run_wsgi_app(*args)
File "C:\ContentBasedRecommender2\anaconda2\lib\site-packages\werkzeug\test.py", line 884, in run_wsgi_app
app_rv = app(environ, start_response)
TypeError: 'dict' object is not callable

can anyone help me with this issue?

@ly0611
Copy link

ly0611 commented Oct 4, 2020

 curl -X GET -H "X-API-TOKEN: FOOBAR1" -H "Content-Type: application/json; charset=utf-8" http://127.0.0.1:5000/train -d '{"data-url": "sample-data.csv"}'

use this :
curl -X GET -H "X-API-TOKEN: FOOBAR1" -H "Content-Type: application/json; charset=utf-8" -d "{"data-url": "sample-data.csv"}" http://127.0.0.1:5000/train

@ly0611
Copy link

ly0611 commented Oct 4, 2020

curl -X GET -H "X-API-TOKEN: FOOBAR1" -H "Content-Type: application/json; charset=utf-8" -d "{"data-url": "sample-data.csv"}" http://127.0.0.1:5000/train

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants