fixes TypeError: decoding str is not supported
Traceback (most recent call last):
File "/home/frappe/frappe-bench/apps/frappe/frappe/app.py", line 57, in application
response = frappe.handler.handle()
File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 22, in handle
data = execute_cmd(cmd)
File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 61, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1038, in call
return fn(*args, **newargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 511, in wrapper_fn
retval = fn(*args, **get_newargs(fn, kwargs))
File "/home/frappe/frappe-bench/apps/frappe/frappe/desk/reportview.py", line 177, in export_query
frappe.response['result'] = text_type(f.read(), 'utf-8')
TypeError: decoding str is not supported
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
* feat: Access log doctype for logging information about private file
downloads, backups downloads, printing and exporting data
* updated: access log
* updated: formattted access_log.js
* access logging: print/pdf/pvt files/export/backup
client side implementation: treeview, query_report
server side implementation on the rest
* fixes: codacy errors
* Update response.py
* Update response.py
* Update response.py
* codacy: please
* travis fixes
* changes:filters=>_filters(lol this works @ times?)
added: tests for access_log, make_access_log formatting, form ui added
buttons
* this hopefully fixes em tests
* changes: fixed indents, session.user, formatting
* fixes: tests, refactor, permissions
emerging from exporter.py => reference doctype in export_data (check
format!)
* fixes: convert dict to json
* changes: added more tests, wrote lesser code?
switched js to display depends on
* fixes: codacy and hopefully travis
* fix: tests? and polishing up
* added column field, removed tracked views
changed access log in exporter.py > export_data
added access log in reportview.py > export_query
* style: Fix indentation
* style: Fix indentation
* fix: Remove problematic string replace
It may replace quotes in the actual filter values which can result in invalid JSON
* fix: Remove filter string conversion
* fix: Error due to quote escapes
TODO: Check for a better way
* fix(reportview): cast docname to string
explicitly cast docnames to string to fix sorting in reportview.py:217
Signed-off-by: Chinmay Pai <chinmaydpai@gmail.com>
* fix: codacy changes
i hate codacy.
* fix(reportview): remove redundant safe_decode call
In Python 3 str and non-str comparison is not allowed.
Bulk delete operation fails when selected docnames meet following condition
1. at least on name can be casted to int or other types e.g. "1", "3123423524", "1.0"
2. at least on name that cannot be casted to other types e.g. "A", "56cd83dab1"
The root cause is $.data() which forcefully casts data-name to non string types when possible