Skip to content

[Bug]: pyrevit clone fails due to 'bin' directory missing in deployments configuration #3454

Description

@TPJW

✈ 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

When attempting to use the pyRevit CLI to create a new clone (e.g. pulling the mainv6 clone with the basepublic deployment), the cloning process fails and crashes with a "Can not find a valid clone inside extracted package" error.

This happens because the CLI downloads the pyRevit repo archive and reads the pyRevitfile to find out what directories to extract. The pyRevitfile still contains references to the bin directory under the [deployments] section. However, the bin directory was renamed to build in the pyRevit repository. Because the CLI is instructed to copy the bin directory that no longer exists in the zip file, it crashes.

⌨ Error/Debug Message

Error: Can not find a valid clone inside extracted package. | Error copying "C:\Users\...\AppData\Local\Temp\master\pyRevit-master\bin" to "C:\pyRevit\latest\bin" | Could not find a part of the path 'C:\Users\...\AppData\Local\Temp\master\pyRevit-master\bin'.

♻️ To Reproduce

  1. Open a terminal / command prompt.
  2. Run the command to pull a new clone, for example: pyrevit clone mainv6 basepublic --dest="C:\pyRevit\mainv6" --debug
  3. See error output indicating it cannot find the bin path.

⏲️ Expected behavior

The CLI should successfully extract the relevant folders for the requested deployment (e.g., basepublic) and register the clone, instead of crashing due to missing folders.

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

==> Registered Clones (full git repos)
==> Registered Clones (deployed from archive/image)
main | Branch: "master" | Version: "5.3.1.25308+1659" | Path: "C:\pyRevit\main"
main640 | Branch: "master" | Version: "6.4.0.26100+0515" | Path: "C:\pyRevit\mainv640"
mainv652 | Branch: "master" | Version: "6.5.2.26175+2113" | Path: "C:\pyRevit\mainv652"
==> Attachments
==> Installed Extensions
[REDACTED EXTENSION 1] | Type: Unknown | Repo: "[REDACTED_URL_1]" | Installed: "C:\pyRevit\Extensions\[REDACTED_1].extension"
[REDACTED EXTENSION 2] | Type: Unknown | Repo: "[REDACTED_URL_2]" | Installed: "C:\pyRevit\Extensions\[REDACTED_2].extension"
[REDACTED EXTENSION 3] | Type: Unknown | Repo: "[REDACTED_URL_3]" | Installed: "C:\pyRevit\Extensions\[REDACTED_3].extension"
==> Default Extension Search Path
C:\Users\<USER>\AppData\Roaming\pyRevit\Extensions
==> Extension Search Paths
C:\pyRevit\Extensions
==> Extension Sources - Default
https://github.com/pyrevitlabs/pyRevit/raw/master/extensions/extensions.json
==> Extension Sources - Additional
==> Installed Revits
2026 First Customer Ship | Version: 26.0.4.409 | Build: 20250227_1515(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2026\"
2025 First Customer Ship | Version: 25.0.2.419 | Build: 20240307_1300(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2025\"
2024.3.5 | Version: 24.3.50.51 | Build: 20260518_1515(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2024\"
2023.1.9 | Version: 23.1.90.15 | Build: 20260220_1515(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2023\"
2022 First Customer Ship | Version: 22.0.2.392 | Build: 20210224_1515(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2022\"
2021.1 (Install) | Version: 21.1.1.109 | Build: 20200715_1022(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2021\"
==> Running Revit Instances
==> User Environment
Microsoft Windows 10 [Version 10.0.26200]
Executing User: <DOMAIN>\<USER>
Error: Could not load file or assembly 'System.Management, Version=10.0.0.5, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.

Additional context

The fix requires updating the pyRevitfile at the root of the repository. Under the [deployments] section, all references to 'bin' within the deployment arrays (core, corex, base, basepublic, basex) should be renamed to 'build'.

Additionally, there might be a hardcoded reference in the CLI source code that still checks for bin (e.g., WarnIfBinEnginesMissing in PyRevitClones.cs line 735) that could be updated, but the fatal error originates purely from the outdated pyRevitfile deployment configurations. probably should be an issue of its own if desired to fix

This was written with the help of Gemini - wish I was this good at documenting issues.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions