TIMFANGZI opened a new issue, #24283:
URL: https://github.com/apache/superset/issues/24283

   When I use AUTH_OAUTH, the '**create chart**' step will have error, and the 
log report:
   ```python
   [ERROR  ] 06/05/2023 02:25:50    base.py:471 : Object of type ellipsis is 
not JSON serializable
   Traceback (most recent call last):
     File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1516, in 
full_dispatch_request
       rv = self.dispatch_request()
     File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1502, in 
dispatch_request
       return 
self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
     File 
"/usr/local/lib/python3.8/site-packages/flask_appbuilder/security/decorators.py",
 line 133, in wraps
       return f(self, *args, **kwargs)
     File "/app/superset/views/chart/views.py", line 69, in add
       "superset/add_slice.html", bootstrap_data=json.dumps(payload)
     File "/usr/local/lib/python3.8/json/__init__.py", line 231, in dumps
       return _default_encoder.encode(obj)
     File "/usr/local/lib/python3.8/json/encoder.py", line 199, in encode
       chunks = self.iterencode(o, _one_shot=True)
     File "/usr/local/lib/python3.8/json/encoder.py", line 257, in iterencode
       return _iterencode(o, 0)
     File "/usr/local/lib/python3.8/json/encoder.py", line 179, in default
       raise TypeError(f'Object of type {o.__class__.__name__} '
   TypeError: Object of type ellipsis is not JSON serializable
   ```
   <img width="1403" alt="image" 
src="https://github.com/apache/superset/assets/46588930/bfcb2ba7-702f-46e6-80a5-dcf050b53e5a";>
   
   Go to the source code, the problem may from this part, I have no idea how 
the OAuth change influence this step
   ```python
       def add(self) -> FlaskResponse:
           payload = {
               "common": common_bootstrap_payload(),
               "user": bootstrap_user_data(g.user),
           }
           print(payload)
           return self.render_template(
               "superset/add_slice.html", bootstrap_data=json.dumps(payload)
           )
   ```
    
   
   #### How to reproduce the bug
   
   1. Go to Chart
   2. Click on Add a new chart
   3. See error
   
   ### Expected results
   
   Normal page
   
   ### Actual results
   
   Internal Error
   
   #### Screenshots
   ### Environment
   
   (please complete the following information):
   
   - browser type and version: 113.0.5672.126 (Official Build) (x86_64)
   - superset version: `2.0.0`
   - python version: `3.7`
   - node.js version: `node -v`
   - any feature flags active:
   
   ### 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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to