I’m trying update a time field from records but I’m getting that error 'float' object has no attribute 'read'
What I’m doing wrong?
Follow log:
Traceback (most recent call last):
File "/home/ubuntu/frappe-bench/apps/frappe/frappe/core/doctype/data_import/importer.py", line 388, in upload
original.save()
File "/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py", line 259, in save
return self._save(*args, **kwargs)
File "/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py", line 310, in _save
self.run_post_save_methods()
File "/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py", line 909, in run_post_save_methods
self.save_version()
File "/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py", line 984, in save_version
if version.set_diff(self._doc_before_save, self):
File "/home/ubuntu/frappe-bench/apps/frappe/frappe/core/doctype/version/version.py", line 15, in set_diff
diff = get_diff(old, new)
File "/home/ubuntu/frappe-bench/apps/frappe/frappe/core/doctype/version/version.py", line 75, in get_diff
new_data = new.get_formatted(df.fieldname) if new_value else new_value
File "/home/ubuntu/frappe-bench/apps/frappe/frappe/model/base_document.py", line 691, in get_formatted
return format_value(val, df=df, doc=doc, currency=currency)
File "/home/ubuntu/frappe-bench/apps/frappe/frappe/utils/formatters.py", line 52, in format_value
return format_time(value)
File "/home/ubuntu/frappe-bench/apps/frappe/frappe/utils/data.py", line 236, in format_time
formatted_time = babel.dates.format_time(get_time(txt), locale=(frappe.local.lang or "").replace("-", "_"))
File "/home/ubuntu/frappe-bench/apps/frappe/frappe/utils/data.py", line 196, in get_time
return parser.parse(time_str).time()
File "/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/dateutil/parser.py", line 1008, in parse
return DEFAULTPARSER.parse(timestr, **kwargs)
File "/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/dateutil/parser.py", line 392, in parse
res = self._parse(timestr, **kwargs)
File "/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/dateutil/parser.py", line 492, in _parse
l = _timelex.split(timestr) # Splits the timestr into tokens
File "/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/dateutil/parser.py", line 174, in split
return list(cls(s))
File "/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/dateutil/parser.py", line 171, in next
return self.__next__() # Python 2.x support
File "/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/dateutil/parser.py", line 164, in __next__
token = self.get_token()
File "/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/dateutil/parser.py", line 82, in get_token
nextchar = self.instream.read(1)
AttributeError: 'float' object has no attribute 'read'