question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot use TestQuery function

See original GitHub issue

Hi Team, I tried to install Promgen via docker-compose and manual as well. Anyway, In both of way, I can not use TestQuery function. It always show jquery.min.js:4 POST http://127.0.0.1:8080/rule/0/test 500 (Internal Server Error) Screen Shot 2019-08-02 at 15 33 44

Log file from docker-compose

> web_1           | [02/Aug/2019 06:25:32] "POST /rule/0/test HTTP/1.1" 500 16836
web_1           | Internal Server Error: /rule/0/test
web_1           | Traceback (most recent call last):
web_1           |   File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner
web_1           |     response = get_response(request)
web_1           |   File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py", line 115, in _get_response
web_1           |     response = self.process_exception_by_middleware(e, request)
web_1           |   File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py", line 113, in _get_response
web_1           |     response = wrapped_callback(request, *callback_args, **callback_kwargs)
web_1           |   File "/usr/local/lib/python3.6/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
web_1           |     return view_func(*args, **kwargs)
web_1           |   File "/usr/local/lib/python3.6/site-packages/django/views/generic/base.py", line 71, in view
web_1           |     return self.dispatch(request, *args, **kwargs)
web_1           |   File "/usr/local/lib/python3.6/site-packages/django/contrib/auth/mixins.py", line 52, in dispatch
web_1           |     return super().dispatch(request, *args, **kwargs)
web_1           |   File "/usr/local/lib/python3.6/site-packages/django/views/generic/base.py", line 97, in dispatch
web_1           |     return handler(request, *args, **kwargs)
web_1           |   File "/usr/src/app/promgen/views.py", line 1241, in post
web_1           |     result = util.get(url, {'query': query}).json()
web_1           |   File "/usr/local/lib/python3.6/site-packages/requests/models.py", line 897, in json
web_1           |     return complexjson.loads(self.text, **kwargs)
web_1           |   File "/usr/local/lib/python3.6/json/__init__.py", line 354, in loads
web_1           |     return _default_decoder.decode(s)
web_1           |   File "/usr/local/lib/python3.6/json/decoder.py", line 339, in decode
web_1           |     obj, end = self.raw_decode(s, idx=_w(s, 0).end())
web_1           |   File "/usr/local/lib/python3.6/json/decoder.py", line 357, in raw_decode
web_1           |     raise JSONDecodeError("Expecting value", s, err.value) from None
web_1           | json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)`

Can you have a look? Thank you CC: @kfdm

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:15 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
kfdmcommented, Aug 5, 2019

Sure, feel free to open a new issue if this particular one is resolved 😃

0reactions
taiyang-licommented, Dec 5, 2019

@tuan-phan I met the same problem with you previously, can you tell how you update the django admin site?

Read more comments on GitHub >

github_iconTop Results From Across the Web

passing return value from a php function to a mysql_query
It turned out that the problem was that I was using $_POST variables, ... the function seems to be a fairly convenient way...
Read more >
Access InStr Function Works or Returns Error at Random
The InStr function in a query that used to work, now more often than not returns #Error, unless supposedly optional parameters are provided ......
Read more >
Re: SQL API ENDPOINT (Passing multiple values in test query)
So, I cannot use SQL API endpoint to filter for a vector of values,i.e let's say multiple country names. I was originally thinking...
Read more >
Testing Query Functions and Viewing Query Plans
You can use Test View to execute any data service read or relationship ... Those results cannot be used for a function that...
Read more >
Write Go unit tests for db CRUD with random data
Every unit test function in Go must start with the Test prefix (with ... Else, we use the connection to create the new...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found