Skip to content

Error (non-repeatable) "f"File {bf} was modified in the future"" after creating directory/files in AD's "apps" directory #2667

Description

@LupinIII

What happened?

I was creating a directory for a new "app" in AppDaemon's apps directory. I that directory I created a py file with boilerplate code (a class with an initialize function that prints to log) and I copied in an (empty) __init__.py from another app. I also added the "app" to AD's apps.yaml.

After saving these files I went to Home Assistant's log viewer to see if the boiler plate was working (I did not reload any YAMLs, AD picked it up automatically). There I saw that the log was filling up with the log output below every second. Essentially

  File "/usr/lib/python3.12/site-packages/appdaemon/dependency_manager.py", line 31, in update
    assert new_mtime > mtime, f"File {bf} was modified in the future"

In between these logs I found the message that AD found my new app:

2026-08-15 16:10:05.403052 INFO AppDaemon: New app config: db_states_coalesce
2026-08-15 16:10:05.404465 INFO AppDaemon: Adding thread 1

I guess that is when I saved the apps.yaml, but the errors were already occuring before that (but definitely not before I created the directory/files). So I am quite sure that the actual trigger was either the directory or file creation. All file access was done via an SMB from a Windows PC.

I "resaved" the files (assuming it had to do something with the file date), but AD was still reporting the error every second. Unfortunately I did not try what would happen, if I deleted the files/directory.

Only after restarting AppDaemon the error was gone (without having made any further changes to the files/directory).

I tried to reproduce this error by repeating the steps, but did not manage to. So this might have been a "lucky" one-time-glitch. I just wanted to report it, as AddDaemon did not recover on its own and there might be a deeper issue. As the AD-apps kept working as expected you wouldn't know that the logs are filling up with a long error message every second, unless you looked at the logs.

Version

0.18.5

Installation type

Home Assistant add-on

Relevant log output

2026-08-15 16:28:29.131722 WARNING AppDaemon: ------------------------------------------------------------
2026-08-15 16:28:29.132572 WARNING AppDaemon: Unexpected error during utility()
2026-08-15 16:28:29.133245 WARNING AppDaemon: ------------------------------------------------------------
2026-08-15 16:28:29.137175 WARNING AppDaemon: Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/appdaemon/utility_loop.py", line 256, in _loop_iteration_context
    yield timing
  File "/usr/lib/python3.12/site-packages/appdaemon/utility_loop.py", line 207, in loop
    await self.AD.app_management.check_app_updates()
  File "/usr/lib/python3.12/site-packages/appdaemon/app_management.py", line 896, in check_app_updates
    await self.check_app_python_files(update_actions)
  File "/usr/lib/python3.12/site-packages/appdaemon/app_management.py", line 1064, in check_app_python_files
    self.dependency_manager.update_python_files(files)
  File "/usr/lib/python3.12/site-packages/appdaemon/dependency_manager.py", line 198, in update_python_files
    return self.python_deps.update(new_files)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/appdaemon/dependency_manager.py", line 68, in update
    return super().update(new_files)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/appdaemon/dependency_manager.py", line 31, in update
    assert new_mtime > mtime, f"File {bf} was modified in the future"
           ^^^^^^^^^^^^^^^^^
TypeError: '>' not supported between instances of 'NoneType' and 'float'
2026-08-15 16:28:29.137947 WARNING AppDaemon: ------------------------------------------------------------

Relevant code in the app or config file that caused the issue

Anything else?

-----------------------------------------------------------
 App: AppDaemon
 Python Apps and Dashboard using AppDaemon 4.x for Home Assistant
-----------------------------------------------------------
 App version: 0.18.5
 You are running the latest version of this app.
 System: Home Assistant OS 18.2  (amd64 / qemux86-64)
 Home Assistant Core: 2026.8.1
 Home Assistant Supervisor: 2026.07.5
-----------------------------------------------------------

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    issueSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions