Configs Seed Error

Hello, I’m pretty new in here so forgive me if I make an error.

I am creating a deployment for pyRevit and trying to seed the configs for all users and keep getting the following error after the seed command:

Error: Failed seeding config file. | The process cannot access the file ‘C:\ProgramData\pyRevit\pyRevit_config.ini’ because it is being used by another process.

  • I have tried deleting all config ini files from AppData and ProgramData
  • I am running commands in an admin cmd
  • I have recently uninstalled pyRevit CLI 0.17.0.0 and installed 4.8.8

This is what my config function looks like:

Write-Output "Configuring pyRevit..."
pyrevit configs logs none
pyrevit configs checkupdates disable
pyrevit configs autoupdate disable
pyrevit configs rocketmode enable
pyrevit configs filelogging disable
pyrevit configs loadbeta disable
pyrevit configs "core:colorize_docs" enable
pyrevit extensions paths forget --all
pyrevit configs "pyRevitTools.extension:disabled" false
pyrevit extensions paths add $ourpyrevitextspath

# this final step is critical
# this seeds the config file for all the future users
pyrevit configs seed

I’m not sure what else to check. Thank you in advance, any advice would be appreciated.

Welcome @lexiko
in all probabilities,
your Revit (with pyRevit) is probably opened / or / your pyrevitconfig.ini file is opened and your setup is trying to access and modify it at the same time it is opened.

1 Like

Hi @Jean-Marc , thank you for your reply.
I don’t know how that is possible though.
I have tried to run the command many times with all Revits closed. I have run the command straight after restarting my PC. I have deleted the ini file. I also have the pyrevit revit kill all command in my sequence

You could try commenting all lines but first and last and wwalk your way through trying to figure out at what point it is not working.

I’ve isolated it down to one command

pyrevit configs seed

The error is persistent. The .ini file does not show as locked before or after running the command.
This issue did not happen with the previous version of CLI.

I’m going to workaround by using my deployer to copy the pyrevit_config to %programdata% and delete any pyrevit_config files from %appdata% for all users. i think that should do the trick for now but it would be good to understand what is happening with the seed command in this version of CLI

2 Likes

Glad you found the issue,
you should file an issue on pyRevit github https://github.com/eirannejad/pyRevit/issues/new/choose

1 Like

I’m still not sure if it’s an issue or if it’s just my issue but I created one here:
https://github.com/eirannejad/pyRevit/issues/1266