Skip to content
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

AttributeError: 'str' object has no attribute 'decode' #75

Open
sprite311 opened this issue Dec 21, 2021 · 0 comments
Open

AttributeError: 'str' object has no attribute 'decode' #75

sprite311 opened this issue Dec 21, 2021 · 0 comments

Comments

@sprite311
Copy link

in python 3.9
Internal Server Error: /api/source/tables/31fd290a-2f2e-44d1-a1c9-c5866c079229
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\site-packages\django\core\handlers\exception.py", line 47, in inner
response = get_response(request)
File "C:\ProgramData\Anaconda3\lib\site-packages\django\core\handlers\base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\django\views\decorators\csrf.py", line 54, in wrapped_view
return view_func(*args, **kwargs)
File "D:\code\databoard-dashboard\py_vislib-master\vislib\views\source.py", line 129, in sourceTables
tableName = list(table.values())[0].decode('utf-8')
AttributeError: 'str' object has no attribute 'decode'
[21/Dec/2021 11:45:26] "GET /api/source/tables/31fd290a-2f2e-44d1-a1c9-c5866c079229 HTTP/1.1" 500 78080

modify:
# tableName = list(table.values())[0].decode('utf-8')
tableName = list(table.values())[0]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant