Hi everyone,
After updating to pyRevit 5.3.1, and occasionally when switching between different Revit versions, we’ve started getting the following error:
‘NoneType’ object has no attribute ‘VersionNumber’
It appears to be triggered by the hooks/doc-updater script.
The issue seems to originate from this file:
AppData\Roaming\pyRevit-Master\pyrevitlib\pyrevit\__init__.py
Further investigation (and a few additional related error messages) suggests that pyRevit is unable to find the app, possibly related to HOS_APP or a similar reference. The only reliable workaround so far has been to disable the doc-updater hook, which we’d prefer not to do.
The line in our doc-updater.py that triggers the issue is:
from pyrevit import EXEC_PARAMS, revit
Occasionally, we also get an error referring to the engine attribute:
IronPython Traceback:
Traceback (most recent call last):
File "X:\All 1 DATABASE\00_Python_Tools\All 1 Special.extension\hooks\doc-updater.py", line 4, in <module>
File "<string>", line 540, in _check_name_wrapper
File "C:\Users\ALL1-PC10\AppData\Roaming\pyRevit-Master\pyrevitlib\pyrevit\__init__.py", line 88, in <module>
File "<string>", line 1565, in load_module
File "<string>", line 597, in _load_module_shim
File "<string>", line 1208, in load
File "<string>", line 1188, in _load_unlocked
File "<string>", line 1117, in _exec
File "<string>", line 1459, in exec_module
File "<string>", line 322, in _call_with_frames_removed
AttributeError: 'module' object has no attribute 'engine'
I know this is a bit of an odd one, but any help, insight, or suggestions would be greatly appreciated—especially if there’s a way to keep the doc-updater enabled.
Thanks!