You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/12/10 05:04:57 UTC

[GitHub] [incubator-superset] rijojoseph07 opened a new issue #11992: Broken chart creation.

rijojoseph07 opened a new issue #11992:
URL: https://github.com/apache/incubator-superset/issues/11992


   I am able to create charts and dashboards from the Explore option in SQLLab, but getting the following error when I try to create a chart from New + button on the home page
   
   Broken URL : /chart/add
   
   
   ```
   File "/usr/local/lib64/python3.6/site-packages/flask/app.py", line 2447, in wsgi_app
       response = self.full_dispatch_request()
     File "/usr/local/lib64/python3.6/site-packages/flask/app.py", line 1952, in full_dispatch_request
       rv = self.handle_user_exception(e)
     File "/usr/local/lib64/python3.6/site-packages/flask/app.py", line 1821, in handle_user_exception
       reraise(exc_type, exc_value, tb)
     File "/usr/local/lib64/python3.6/site-packages/flask/_compat.py", line 39, in reraise
       raise value
     File "/usr/local/lib64/python3.6/site-packages/flask/app.py", line 1950, in full_dispatch_request
       rv = self.dispatch_request()
     File "/usr/local/lib64/python3.6/site-packages/flask/app.py", line 1936, in dispatch_request
       return self.view_functions[rule.endpoint](**req.view_args)
     File "/usr/local/lib64/python3.6/site-packages/flask_appbuilder/security/decorators.py", line 109, in wraps
       return f(self, *args, **kwargs)
     File "/usr/local/lib/python3.6/site-packages/superset/views/chart/views.py", line 71, in add
       "superset/add_slice.html", bootstrap_data=json.dumps(payload)
     File "/usr/lib64/python3.6/json/__init__.py", line 231, in dumps
       return _default_encoder.encode(obj)
     File "/usr/lib64/python3.6/json/encoder.py", line 199, in encode
       chunks = self.iterencode(o, _one_shot=True)
     File "/usr/lib64/python3.6/json/encoder.py", line 257, in iterencode
       return _iterencode(o, 0)
     File "/usr/lib64/python3.6/json/encoder.py", line 180, in default
       o.__class__.__name__)
   TypeError: Object of type 'function' is not JSON serializable
   <img width="1435" alt="Screen Shot 2020-12-10 at 10 31 08 AM" src="https://user-images.githubusercontent.com/22840697/101723849-2c428700-3ad3-11eb-80fa-3737a2ffc520.png">
   
   ```
   
   
   ### Expected results
   
   New chart view should open. 
   
   ### Actual results
   
   Getting 5XX error
   
   #### Screenshots
   <img width="1435" alt="Screen Shot 2020-12-10 at 10 31 08 AM" src="https://user-images.githubusercontent.com/22840697/101723881-40868400-3ad3-11eb-8fbe-07903c7d9956.png">
   
   
   #### How to reproduce the bug
   
   1. Go to 'Welcome page'
   2. Click on '+ New'
   3. Click on 'Charts'
   4. See error
   
   ### Environment
   
   (please complete the following information):
   
   - superset version: `0.38.0`
   - python version: 3.6.3 & 3.7.3
   
   ### Checklist
   
   Make sure to follow these steps before submitting your issue - thank you!
   
   - [ ] I have checked the superset logs for python stacktraces and included it here as text if there are any.
   - [ ] I have reproduced the issue with at least the latest released version of superset.
   - [ ] I have checked the issue tracker for the same issue and I haven't found one similar.
   
   ### Additional context
   
   Add any other context about the problem here.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] dpgaspar commented on issue #11992: Broken chart creation.

Posted by GitBox <gi...@apache.org>.
dpgaspar commented on issue #11992:
URL: https://github.com/apache/incubator-superset/issues/11992#issuecomment-742437970


   Hi @rijojoseph07,
   
   Thank you for reporting it. Really can't reproduce it on 0.38.0 with plain bootstrap data. Have you upgraded from a previous version?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] rijojoseph07 edited a comment on issue #11992: Broken chart creation.

Posted by GitBox <gi...@apache.org>.
rijojoseph07 edited a comment on issue #11992:
URL: https://github.com/apache/incubator-superset/issues/11992#issuecomment-742439999


   Not really @dpgaspar , I installed it fresh on a new VM but the metadata was copied from a previous version (0.37.0) and did a db upgrade. 
   Also, the initial installation was on python 3.6.3, upgraded to 3.7.3 just to check if this fixes this issue. 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] rijojoseph07 edited a comment on issue #11992: Broken chart creation.

Posted by GitBox <gi...@apache.org>.
rijojoseph07 edited a comment on issue #11992:
URL: https://github.com/apache/incubator-superset/issues/11992#issuecomment-742445001


   I was able to fix this by making a small change in `superset/views/chart/views.py`
   
   Changed `json.dumps()` to` jsons.dumps()`
   
   ` return self.render_template(
               "superset/add_slice.html", bootstrap_data=json.dumps(payload)
           )
   `
   to 
   
   ` return self.render_template(
               "superset/add_slice.html", bootstrap_data=jsons.dumps(payload)
           )
   `
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] dpgaspar commented on issue #11992: Broken chart creation.

Posted by GitBox <gi...@apache.org>.
dpgaspar commented on issue #11992:
URL: https://github.com/apache/incubator-superset/issues/11992#issuecomment-742516480


   Thank you for the feedback, so there was existing previous data, makes sense.
   
   Do you have any lambda/function/method/class on your config?
   
   if not, can you share the output from `payload`? by placing a print(payload) for example?
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] rijojoseph07 edited a comment on issue #11992: Broken chart creation.

Posted by GitBox <gi...@apache.org>.
rijojoseph07 edited a comment on issue #11992:
URL: https://github.com/apache/incubator-superset/issues/11992#issuecomment-742445001


   I was able to fix this by making a small change in `superset/views/chart/views.py`
   
   Changed json.dumps to jsons.dumps
   
   ` return self.render_template(
               "superset/add_slice.html", bootstrap_data=json.dumps(payload)
           )
   `
   to 
   
   ` return self.render_template(
               "superset/add_slice.html", bootstrap_data=jsons.dumps(payload)
           )
   `
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] rijojoseph07 commented on issue #11992: Broken chart creation.

Posted by GitBox <gi...@apache.org>.
rijojoseph07 commented on issue #11992:
URL: https://github.com/apache/incubator-superset/issues/11992#issuecomment-742445001


   I was able to fix this by changing a small change in `superset/views/chart/views.py`
   
   Changed json.dumps to jsons.dumps
   
   ` return self.render_template(
               "superset/add_slice.html", bootstrap_data=json.dumps(payload)
           )
   `
   to 
   
   ` return self.render_template(
               "superset/add_slice.html", bootstrap_data=jsons.dumps(payload)
           )
   `
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] rijojoseph07 commented on issue #11992: Broken chart creation.

Posted by GitBox <gi...@apache.org>.
rijojoseph07 commented on issue #11992:
URL: https://github.com/apache/incubator-superset/issues/11992#issuecomment-742439999


   Not really, I installed it fresh on a new VM but the metadata was copied from a previous version (0.37.0) and did a db upgrade. 
   Also, the initial installation was on python 3.6.3, upgraded to 3.7.3 just to check if this fixes this issue. 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org