Reinstall issue: type object 'datetime.datetime' has no attribute 'datetime'

[2025-01-08 12:17:20.424] [error] Failed to execute startup-script: C:\Users\XXX\AppData\Local\Programs@comfyorgcomfyui-electron\resources\ComfyUI\custom_nodes\ComfyUI-Manager\prestartup_script.py / type object ‘datetime.datetime’ has no attribute ‘datetime’

[2025-01-08 12:17:20.425] [error] object address : 0000020057111770
object refcount : 3
object type : 00007FFBDF9E2270
object type name: AttributeError
object repr : AttributeError(“type object ‘datetime.datetime’ has no attribute ‘datetime’”)
lost sys.stderr

2 Likes

Yeap, I’m having the same issue when trying to reinstall latest 0.4.5 on Windows 10:

[2025-01-14 18:53:55.235] [error] Failed to execute startup-script: C:\Users\Admin\AppData\Local\Programs@comfyorgcomfyui-electron\resources\ComfyUI\custom_nodes\ComfyUI-Manager\prestartup_script.py / type object ‘datetime.datetime’ has no attribute ‘datetime’
object address : 000002604FE415B0
object refcount : 3
object type : 00007FFE3DD82270
object type name: AttributeError
object repr : AttributeError(“type object ‘datetime.datetime’ has no attribute ‘datetime’”)

I’m using a Windows on Brazilian Portuguese date setup (DD/MM/YYYY instead of MM/DD/YYYY)… Could it be related to it?

My portable ComfyUI is just fine. :slight_smile:

Thanks!

RoD

Same issue on the Mac install running 0.4.5 on M2 Apple Silicon:

[2025-01-14 21:34:54.564] [error] Failed to execute startup-script: /Applications/ComfyUI.app/Contents/Resources/ComfyUI/custom_nodes/ComfyUI-Manager/prestartup_script.py / type object ‘datetime.datetime’ has no attribute ‘datetime’

[2025-01-14 21:34:54.564] [error] object address : 0x106cb8430
object refcount : 3
object type : 0x104da7198
object type name: AttributeError
object repr : AttributeError(“type object ‘datetime.datetime’ has no attribute ‘datetime’”)
lost sys.stderr

The strange thing is I successfully installed and ran earlier today, but after initiating a re-start via the manager, started getting this error.

I resolved the issue by deleting my custom node/ComfyUI-Manager. The issue may be in that package.

Did you install any extensions / custom nodes between the last good start of the app, and restarting via Manager?

No. I think there was a conflict between my original ComfyUI install and the one handled by the desktop app. I deleted the Comfy-UI-Manager from my original install, deleted the fresh install with the desktop app, then re-ran the install without migrating my prior data and problem was resolved. I then manually copied models, VAEs, etc into the new install and was able to see expected behavior when using the Manager to install additional custom nodes.

Excellent; thank you for letting us know! It really is quite helpful.

官方真傻逼 都2025年了 还出现这种儿童级别的bug

請問可以怎樣解決這bug?

I had same problem, I deleted ComfyUI-Manager, and also comfyui-animatediff and ComfyUI-AnimateDiff-Evolved from Custom nodes, but I want them back, any idea for solution without deleting those nodes? I am really new with ComfyUI, started with it just yesterday.