zopefoundation / DateTime

This package provides a DateTime data type, as known from Zope. Unless you need to communicate with Zope APIs, you're probably better off using Python's built-in datetime module.
Other
19 stars 25 forks source link

error DatetimeProperties' object has no attribute 'week' #49

Closed jsgaston closed 1 year ago

jsgaston commented 1 year ago

BUG/PROBLEM REPORT / FEATURE REQUEST

I reinstalled windows, and since then, I get allways this same error:


Traceback (most recent call last):
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\threading.py", line 980, in _bootstrap_inner
    self.run()
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\threading.py", line 917, in run
    self._target(*self._args, **self._kwargs)
  File "c:\Users\jsgas\OneDrive\Trading\SteUi\SteUi_Junior\SteUi_Jr.py", line 1374, in test
    fastai.tabular.add_datepart(df2, 'time', drop='True')
  File "C:\Users\jsgas\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\fastai\tabular\transform.py", line 63, in add_datepart
    for n in attr: df[prefix + n] = getattr(field.dt, n.lower())
AttributeError: 'DatetimeProperties' object has no attribute 'week'

What I did:

What I expect to happen: this error didnt appear yesturday

What actually happened: just reinstalled windows

What version of Python and Zope/Addons I am using: 3.9.13

win11

davisagli commented 1 year ago

This error doesn't appear to have anything to do with the Zope DateTime library. The traceback shows the error occurring in a package called fastai.