'%Y-%m-%d' is not datetime object but string but you (or some other code) are trying to use it as datetime object.

Answer from iced on Stack Overflow
🌐
Backtrader Community
community.backtrader.com › topic › 791 › attributeerror-float-object-has-no-attribute-isoformat
AttributeError: 'float' object has no attribute 'isoformat' | Backtrader Community
December 30, 2017 - @Nguyễn-Tài-Nguyên said in AttributeError: 'float' object has no attribute 'isoformat': def next(self): self.log('Close, %.2f', self.dataclose[0]) You pass a float and you get a float error. Fix it by not passing a float. You probably wanted ...
Discussions

AttributeError: 'str' object has no attribute 'isoformat' with ETA
Checklist $ pip freeze | grep celery celery==4.1.0 django-celery-results==1.0.1 Steps to reproduce Create chord, add eta. from datetime import datetime, timedelta from celery import chain, group @s... More on github.com
🌐 github.com
3
February 27, 2018
python - Float' object has no attribute - Stack Overflow
AttributeError : 'float' object has no attribute '1 More on stackoverflow.com
🌐 stackoverflow.com
AttributeError: 'NoneType' object has no attribute 'isoformat'`
PS C:\Users\thedo\Downloads\byImpf-main> python impf.py --citizen-id=ID --email=email --password=pw Traceback (most recent call last): File "C:\Users\thedo\Downloads\byImpf-main\impf.py", line 320, in checker.find(earliest_day=args.earliest_day.isoformat(), book=args.book) AttributeError: ... More on github.com
🌐 github.com
5
November 26, 2021
AttributeError: 'float' object has no attribute 'value_in_unit' (and others)
Right now CI is failing due to the new openff toolkit using a different package for units. The openff-unit package provides a way to support both using openmm.units and openff.units. For now in PR #129 I will just pin to the older toolki... More on github.com
🌐 github.com
9
September 26, 2022
🌐
GitHub
github.com › celery › celery › issues › 4560
AttributeError: 'str' object has no attribute 'isoformat' with ETA · Issue #4560 · celery/celery
February 27, 2018 - Checklist $ pip freeze | grep celery celery==4.1.0 django-celery-results==1.0.1 Steps to reproduce Create chord, add eta. from datetime import datetime, timedelta from celery import chain, group @shared_task def add(a, b): return a + b @...
Author   scobb
🌐
Django
code.djangoproject.com › ticket › 30238
#30238 (Exception when saving model created with string for DateField) – Django
The AttributeError is not raised. This test fails at the assertRaisesMessage() call: class Tests(TestCase): def test_attribute_error_stops_save(self): my_model_args = { 'worthless_field' : '2019-02-07'} myExceptionalModel = MyModel( **my_model_args) msg = "'str' object has no attribute 'isoformat'" with self.assertRaisesMessage(AttributeError, msg): myExceptionalModel.save() self.assertEqual(0, MyModel.objects.count())
🌐
Google Groups
groups.google.com › g › wxpython-users › c › aJylL6xltA0
datetime - no attribute 'isoformat'?
. . self.date = wx.DatePickerCtrl(self, -1) . . . my_date = self.date.GetValue() isodate = my_date.isoformat() The error : AttributeError: 'DateTime' object has no attribute 'isoformat' - I'm trying to insert this into a MySQL database using MySQLdb so the ISO format is kinda important!
🌐
Bobby Hadz
bobbyhadz.com › blog › python-attributeerror-float-object-has-no-attribute
AttributeError: 'float' object has no attribute 'X' (Python) | bobbyhadz
The Python "AttributeError: 'float' object has no attribute" occurs when we try to access an attribute that doesn't exist on a floating-point number, e.g.
Find elsewhere
🌐
marshmallow
marshmallow.readthedocs.io › en › stable › upgrading.html
Upgrading to newer releases - marshmallow 4.2.4 documentation
from marshmallow import Schema, fields, ValidationError invalid_data = dict(created_at="invalid") class WidgetSchema(Schema): created_at = fields.DateTime() # 2.x WidgetSchema(strict=True).dump(invalid_data) # marshmallow.exceptions.ValidationError: {'created_at': ['"invalid" cannot be formatted as a datetime.']} # 3.x WidgetSchema().dump(invalid_data) # AttributeError: 'str' object has no attribute 'isoformat' # Instead, validate before dumping schema = WidgetSchema() try: widget = schema.load(invalid_data) except ValidationError: print("handle errors...") else: dumped = schema.dump(widget)
🌐
GitHub
github.com › marshmallow-code › marshmallow › issues › 2189
Validation does not occur on serialization documentation issue · Issue #2189 · marshmallow-code/marshmallow
September 17, 2023 - from marshmallow import Schema, fields, ValidationError invalid_data = dict(created_at="invalid") class WidgetSchema(Schema): created_at = fields.DateTime(data_key='createdAt') # 2.x # WidgetSchema(strict=True).dump(invalid_data) # marshmallow.exceptions.ValidationError: {'created_at': ['"invalid" cannot be formatted as a datetime.']} # 3.x # WidgetSchema().dump(invalid_data) # AttributeError: 'str' object has no attribute 'isoformat' # Instead, validate before dumping schema = WidgetSchema() try: widget = schema.load(invalid_data) except ValidationError as e: print("handle errors...
🌐
GitHub
github.com › muffix › byImpf › issues › 1
AttributeError: 'NoneType' object has no attribute 'isoformat'` · Issue #1 · muffix/byImpf
November 26, 2021 - PS C:\Users\thedo\Downloads\byImpf-main> python impf.py --citizen-id=ID --email=email --password=pw Traceback (most recent call last): File "C:\Users\thedo\Downloads\byImpf-main\impf.py", line 320, in <module> checker.find(earliest_day=args.earliest_day.isoformat(), book=args.book) AttributeError: ...
Author   WegnerDan
🌐
GitHub
github.com › choderalab › espaloma › issues › 130
AttributeError: 'float' object has no attribute 'value_in_unit' (and others) · Issue #130 · choderalab/espaloma
September 26, 2022 - AttributeError: 'float' object has no attribute 'value_in_unit' (and others)#130 · Copy link · mikemhenry · opened · on Sep 26, 2022 · Issue body actions · Right now CI is failing due to the new openff toolkit using a different package for units. The openff-unit package provides a way to support both using openmm.units and openff.units.
Author   mikemhenry
🌐
GitHub
github.com › insightindustry › sqlathanor › issues › 73
AttributeError: 'datetime.timedelta' object has no attribute 'isoformat' · Issue #73 · insightindustry/sqlathanor
August 22, 2019 - Traceback (most recent call last): File "####/lib/python3.7/site-packages/sqlathanor/default_serializers.py", line 67, in to_isoformat value = value.isoformat() AttributeError: 'datetime.timedelta' object has no attribute 'isoformat' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "####/lib/python3.7/site-packages/sqlathanor/declarative/base_model.py", line 175, in _get_serialized_value return_value = on_serialize(getattr(self, attribute, None)) File "####/lib/python3.7/site-packages/sqlathanor/default_serializers.py", line 69, in to_
Author   bzaks1424
🌐
Reddit
reddit.com › r/learnpython › timemodule not working
r/learnpython on Reddit: Timemodule not working
January 15, 2022 -

Hi just a quick one for any python pros, i have just started using python 3. I am reading the documentation for the datetime module and trying to practice with it, however alot of the code that im trying doesnt actually seem to work.

For example, in the documentation is this example:

>>> from datetime import date

>>> date.fromisoformat('2019-12-04')

datetime.date(2019, 12, 4)

However when i copy the same code, i get this error message

Traceback (most recent call last):

File "<pyshell#1>", line 1, in <module>

date.fromisoformat('2019-12-04')

AttributeError: type object 'datetime.date' has no attribute 'fromisoformat'

Any advice/help is much appreciated, thanks.

🌐
GeeksforGeeks
geeksforgeeks.org › python › how-to-fix-attributeerror-object-has-no-attribute
How to fix AttributeError: object has no attribute - GeeksforGeeks
July 23, 2025 - To understand this error, we first have to know how to read the error message effectively. It typically consists of two parts: "AttributeError" and "Object has no attribute." The former indicates the type of error, and the latter suggests that the attribute we are trying to access does not exist for the object.
🌐
GitHub
github.com › celery › celery › issues › 4083
Tasks with expires fail with AttributeError("'str' object has no attribute 'isoformat'",) · Issue #4083 · celery/celery
June 12, 2017 - Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/celery/app/task.py", line 684, in retry S.apply_async() File "/usr/lib/python3.6/site-packages/celery/canvas.py", line 221, in apply_async return _apply(args, kwargs, **options) File "/usr/lib/python3.6/site-packages/celery/app/task.py", line 535, in apply_async **options File "/usr/lib/python3.6/site-packages/celery/app/base.py", line 729, in send_task root_id, parent_id, shadow, chain, File "/usr/lib/python3.6/site-packages/celery/app/amqp.py", line 334, in as_task_v2 expires = expires and expires.isoformat() AttributeError: 'str' object has no attribute 'isoformat'
Author   jmaroeder
🌐
Rssing
python1233.rssing.com › chan-44877200 › article18040.html
ItsMyCode: [Solved] AttributeError: ‘float’ object has no attribute ‘get’
The type of the object is <class 'float'> List of valid attributes in this object is ['__abs__', '__add__', '__bool__', '__ceil__', '__class__', '__delattr__', '__dir__', '__divmod__', '__doc__', '__eq__', '__float__', '__floor__', '__floordiv__', '__format__', '__ge__', '__getattribute__', '__getformat__', '__getnewargs__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__int__', '__le__', '__lt__', '__mod__', '__mul__', '__ne__', '__neg__', '__new__', '__pos__', '__pow__', '__radd__', '__rdivmod__', '__reduce__', '__reduce_ex__', '__repr__', '__rfloordiv__', '__rmod__', '__rmul__', '__round__', '__rpow__', '__rsub__', '__rtruediv__', '__set_format__', '__setattr__', '__sizeof__', '__str__', '__sub__', '__subclasshook__', '__truediv__', '__trunc__', 'as_integer_ratio', 'conjugate', 'fromhex', 'hex', 'imag', 'is_integer', 'real']