-
Notifications
You must be signed in to change notification settings - Fork 74
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
Issue at admin's page #27
Comments
According to this link https://groups.google.com/forum/#!topic/django-blog-zinnia/-AU2EzCL9M0 you can edit your local repo and change I traced back the origin of the error and I found that it is raised in this function:
More insights:
And finally this is my class for CustomIndexDashboard:
Then l found that the smart_unicode error is being raised on this imports.
Digging deeper
Finally the error:
So we need to add support for python 3 for this package: https://bitbucket.org/kmike/django-cache-utils/ please read: https://bitbucket.org/kmike/django-cache-utils/issues/12/add-compatibility-with-python-3 And after that update |
ImportError at /admin/
cannot import name 'smart_unicode'
Request Method: GET
Request URL: http://127.0.0.1:8000/admin/
Django Version: 1.10.4
Exception Type: ImportError
Exception Value:
cannot import name 'smart_unicode'
Exception Location: /myvenv/lib/python3.5/site-packages/cache_utils/utils.py in , line 2
Python Executable: /myvenv/bin/python
Python Version: 3.5.2
Python Path:
['/Users/Miro/Desktop/DjangoProjektApp',
'/Library/Frameworks/Python.framework/Versions/3.5/lib/python35.zip',
'/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5',
'/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/plat-darwin',
'/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/lib-dynload',
'/Users/Miro/Desktop/DjangoProjektApp/myvenv/lib/python3.5/site-packages']
Server time: Mon, 2 Jan 2017 23:26:32 +0000
Error during template rendering
In template /myvenv/lib/python3.5/site-packages/admin_tools/dashboard/templates/admin/index.html, error at line 5
cannot import name 'smart_unicode'
1 {% extends "admin:admin/index.html" %}
2 {% load admin_tools_dashboard_tags %}
3 {% block extrastyle %}
4 {{ block.super }}
5 {% block dashboard_css %}{% admin_tools_render_dashboard_css %}{% endblock %}
6 {% endblock %}
7 {% block coltype %}{% endblock %}
8 {% block bodyclass %}dashboard{% endblock %}
9 {% block content_title %}{% endblock %}
10 {% block content %}
11 {% admin_tools_render_dashboard %}
12 {% endblock %}
13 {% block sidebar %}{% endblock %}
When I changed smart_unicode to smart_text I get following error:
File "/myvenv/lib/python3.5/site-packages/cache_utils/utils.py", line 29, in _func_type
argnames = func.func_code.co_varnames[:func.func_code.co_argcount]
AttributeError: 'function' object has no attribute 'func_code'
Can anyone help me to fix this ?
The text was updated successfully, but these errors were encountered: