chat
chat copied to clipboard
AttributeError: type object 'datetime.time' has no attribute 'fromisoformat'
running this error after installing it to my site
ubuntu version 18.04 python3 version 3.6.9
App Versions
{
"chat": "0.0.1",
"erpnext": "13.17.0",
"frappe": "13.17.1"
}
Route
Workspaces/Home
Trackeback
Traceback (most recent call last):
File "apps/frappe/frappe/app.py", line 68, in application
response = frappe.api.handle()
File "apps/frappe/frappe/api.py", line 55, in handle
return frappe.handler.handle()
File "apps/frappe/frappe/handler.py", line 31, in handle
data = execute_cmd(cmd)
File "apps/frappe/frappe/handler.py", line 67, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File "apps/frappe/frappe/__init__.py", line 1208, in call
return fn(*args, **newargs)
File "apps/chat/chat/api/config.py", line 22, in settings
config = {**config, **get_chat_settings()}
File "apps/chat/chat/utils/__init__.py", line 97, in get_chat_settings
start_time = datetime.time.fromisoformat(chat_settings.start_time)
AttributeError: type object 'datetime.time' has no attribute 'fromisoformat'
Request Data
{
"type": "GET",
"args": {
"token": ""
},
"headers": {},
"error_handlers": {},
"url": "/api/method/chat.api.config.settings"
}
Response Data
{
"exception": "AttributeError: type object 'datetime.time' has no attribute 'fromisoformat'"
}
python3 version 3.6.9
the datetime.time.fromisoformat
is not available in python < 3.7, as mentioned in their docs
can you please try upgrading the python version?
After Updating python to 3.7, my bench framework stop stops wroking and when I downgrade back to 3.6.9 my bench framework starts working again
@phot0n we technically support 3.6 on version 13 so it has to be fixed 😅
@aditsanghvi I am not sure how you've upgraded the version. Upgrading bench's version also requires swapping env
(virtualenvironment)
https://github.com/frappe/chat/pull/34
you can use datetime.strptime(chat_settings.start_time,"specify_format")