Skip to content

[Bug]: pyRevit_config.ini is being used by another process #2512

Closed
@archeduardo5

Description

@archeduardo5

✈ Pre-Flight checks

  • I don't have SentinelOne antivirus installed (see above for the solution)
  • I have searched in the issues (open and closed) but couldn't find a similar issue
  • I have searched in the pyRevit Forum for similar issues
  • I already followed the installation troubleshooting guide thoroughly
  • I am using the latest pyRevit Version

🐞 Describe the bug

PyRevit is unable to load due to a file access conflict with the configuration file. When launching Revit, pyRevit throws an IOError indicating that the pyRevit_config.ini file is being used by another process and cannot be accessed.

This happens on every Revit startup attempt and prevents pyRevit from loading properly. The error occurs specifically with the configuration file located at:
C:\Users[username]\AppData\Roaming\pyRevit\pyRevit_config.ini

The error prevents PyRevit from initializing and loading any of its tools or functions. This appears to be a file locking issue where the configuration file is either:

  1. Locked by another process
  2. Has incorrect permissions
  3. Is being accessed simultaneously by multiple processes

⌨ Error/Debug Message

IronPython Traceback:
Traceback (most recent call last):
  File "C:\Program Files\pyRevit-Master\bin\engines\pyRevitLoader.py", line 33, in <module>
  File "C:\Program Files\pyRevit-Master\pyrevitlib\pyrevit\loader\sessionmgr.py", line 267, in load_session
  File "C:\Program Files\pyRevit-Master\pyrevitlib\pyrevit\loader\sessioninfo.py", line 49, in setup_runtime_vars
  File "C:\Program Files\pyRevit-Master\pyrevitlib\pyrevit\userconfig.py", line 689, in get_current_attachment
IOError: [Errno 32] The process cannot access the file 'C:\Users\arch1\AppData\Roaming\pyRevit\pyRevit_config.ini' because it is being used by another process.

Script Executor Traceback:
System.IO.IOException: The process cannot access the file 'C:\Users\arch1\AppData\Roaming\pyRevit\pyRevit_config.ini' because it is being used by another process.
   at Microsoft.Scripting.Runtime.LightExceptions.ThrowException(LightException lightEx)
   at Microsoft.Scripting.Runtime.LightExceptions.CheckAndThrow(Object value)
   [resto del traceback...]

♻️ To Reproduce

  1. Start Revit
  2. Wait for pyRevit to initialize
  3. Error message appears indicating inability to access pyRevit_config.ini
  4. The error consistently appears on every Revit startup
  5. PyRevit fails to load completely

⏲️ Expected behavior

PyRevit should load normally on Revit startup without any file access errors. The configuration file should be accessible and allow PyRevit to initialize properly with all its tools and functions available.

🖥️ Hardware and Software Setup (please complete the following information)

C:\Windows\System32>pyrevit env
==> Registered Clones (full git repos)
==> Registered Clones (deployed from archive/image)
master | Deploy: "basepublic" | Branch: "master" | Version: "4.8.15.24089+0912" | Path: "C:\Program Files\pyRevit-Master"
==> Attachments
master | Product: "Autodesk Revit 2025" | Engine: DEFAULT (2711) | Path: "C:\Program Files\pyRevit-Master" | AllUsers
master | Product: "Autodesk Revit 2024" | Engine: DEFAULT (2711) | Path: "C:\Program Files\pyRevit-Master" | AllUsers
==> Installed Extensions
==> Default Extension Search Path
C:\Users\archl\AppData\Roaming\pyRevit\Extensions
==> Extension Search Paths
==> Extension Sources - Default
https://github.com/eirannejad/pyRevit/raw/master/extensions/extensions.json
==> Extension Sources - Additional
==> Installed Revits
Autodesk Revit 2025 | Version: 25.4.0.32 | Build: 20241202_1040(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2025\"
Autodesk Revit 2024 | Version: 24.3.10.22 | Build: 20241105_1515(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2024\"
==> Running Revit Instances
Error: Referencia a objeto no establecida como instancia de un objeto.
Run with "--debug" option to see debug messages

Additional context

  • The error occurs in a fresh installation of pyRevit
  • No antivirus software is blocking the file access
  • All Revit processes have been checked in Task Manager to ensure no conflicting processes
  • The config file location has been verified to have proper read/write permissions
  • Previous attempts to resolve:
    • Restarted Revit
    • Checked file permissions
    • Verified no other processes are locking the file
    • Attempted to create a new config file

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugBug that stops user from using the tool or a major portion of pyRevit functionality [class]

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions