Comments (5)
I am having a similar problem
Traceback (most recent call last):
File "/home/cnf/.virtualenvs/kassets/lib/python2.7/site-packages/flask/app.py", line 1701, in __call__
return self.wsgi_app(environ, start_response)
File "/home/cnf/Projects/Kangaroot/kassets/kassets/rev_proxied.py", line 35, in __call__
return self.app(environ, start_response)
File "/home/cnf/.virtualenvs/kassets/lib/python2.7/site-packages/flask/app.py", line 1689, in wsgi_app
response = self.make_response(self.handle_exception(e))
File "/home/cnf/.virtualenvs/kassets/lib/python2.7/site-packages/flask/app.py", line 1687, in wsgi_app
response = self.full_dispatch_request()
File "/home/cnf/.virtualenvs/kassets/lib/python2.7/site-packages/flask/app.py", line 1362, in full_dispatch_request
response = self.process_response(response)
File "/home/cnf/.virtualenvs/kassets/lib/python2.7/site-packages/flask/app.py", line 1564, in process_response
response = handler(response)
File "/home/cnf/.virtualenvs/kassets/lib/python2.7/site-packages/flask_debugtoolbar/__init__.py", line 171, in process_response
toolbar_html = self.debug_toolbars[real_request].render_toolbar()
File "/home/cnf/.virtualenvs/kassets/lib/python2.7/site-packages/flask_debugtoolbar/toolbar.py", line 74, in render_toolbar
return template.render(**context)
File "/home/cnf/.virtualenvs/kassets/lib/python2.7/site-packages/jinja2/environment.py", line 894, in render
return self.environment.handle_exception(exc_info, True)
File "/home/cnf/.virtualenvs/kassets/lib/python2.7/site-packages/flask_debugtoolbar/templates/base.html", line 49, in top-level template code
{{ panel.content()|safe }}
File "/home/cnf/.virtualenvs/kassets/lib/python2.7/site-packages/flask_debugtoolbar/panels/template.py", line 67, in content
'editable': is_editor_enabled(),
File "/home/cnf/.virtualenvs/kassets/lib/python2.7/site-packages/flask_debugtoolbar/panels/__init__.py", line 28, in render
return template.render(**context)
File "/home/cnf/.virtualenvs/kassets/lib/python2.7/site-packages/jinja2/environment.py", line 894, in render
return self.environment.handle_exception(exc_info, True)
File "/home/cnf/.virtualenvs/kassets/lib/python2.7/site-packages/flask_debugtoolbar/templates/panels/template.html", line 18, in top-level template code
<td>{{ v|printable }}</td>
File "/home/cnf/.virtualenvs/kassets/lib/python2.7/site-packages/flask_debugtoolbar/__init__.py", line 34, in _printable
return repr(value)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2122' in position 32: ordinal not in range(128)
from flask-debugtoolbar.
Same issue.
from flask-debugtoolbar.
Yes, the original issue happens on the SQL panel when the SECRET_KEY contains non-ascii characters. This breaks the code generating a signature for the query.
I decided to go ahead and just replace the query signing with the "itsdangerous" module that Flask is now using for signing cookies. That seemed cleaner that just patching up the current signing code.
from flask-debugtoolbar.
cnf: the error you're seeing is a duplicate of #39. The root cause is a bad __repr__
in your code or another library. The __repr__
method should not be returning a unicode object. I provided a little more detail on the proposed patch 20a302c.
I may reconsider catching this and showing an error message instead, but to really fix the issue you should make sure the class implemented __repr__
returns a Python str
object instead of unicode
.
from flask-debugtoolbar.
Ah fair enough... I'll see where that comes from...
thanks!
from flask-debugtoolbar.
Related Issues (20)
- Migrate the repo to `pallets-eco/flask-debugtoolbar` HOT 1
- Update CI workflows
- Modernize our packaging metadata files HOT 1
- New release incorporating the Flask-SQLAlchemy 3.x changes HOT 4
- Drop support for python 2 HOT 1
- Subdomains support HOT 2
- quickstart broken link
- Not working for subdmains - blocked by chrome/firefox because of http instead of https HOT 2
- '_request_ctx_stack' is deprecated and will be removed in Flask 2.3 HOT 3
- Breaks with Flask 2.3.0 (okay with 2.3.1) HOT 1
- Scrollbar not appearing HOT 1
- More help with reviewers/committers/maintainers? HOT 3
- flask-debugtoolbar is incompatible with newest version of werkzeug. HOT 2
- 0.13.1 breaks with Flask 3.0: ImportError: cannot import name '_request_ctx_stack' from 'flask.globals HOT 7
- 0.13.1 breaks on werkzeug 3: Response' object has no attribute 'charset HOT 1
- Drop support for Flask < 2.2.0 (and implicitly Python < 3.7) HOT 2
- Add a basic integration test that ensures the python package is installable HOT 5
- ReadTheDocs builds are broken HOT 2
- Address Flask 3.0 deprecation warnings on using __version__ (to be removed in Flask 3.1) HOT 2
- sql_select/sql_explain not working with Flask-SQLAlchemy 3 & SQLAlchemy 2 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flask-debugtoolbar.