Update Extension

I am having trouble updating my extension using the update button from the pyRevit ribbon.

My extension shows correctly in the extension manager and includes the necessary login information. When I run the updater in debug mode this is what I get:

INFO [pyrevit.versionmgr.updater] Checking internet connection...

DEBUG [pyrevit.versionmgr.updater] Url access successful: http://todoist.com/

DEBUG [pyrevit.versionmgr.updater] Fetching updates for: C:\pyRevit-Master\pyRevit\

DEBUG [pyrevit.versionmgr.updater] Fetching remote: origin of C:\pyRevit-Master\pyRevit\

DEBUG [pyrevit.coreutils.git] Making fetch options: <type 'RepoInfo' head 'b074f295861b617054c2ad1f6071bba50c885181' @ C:\pyRevit-Master\pyRevit\>

DEBUG [pyrevit.coreutils.git] Successfully pulled repo: C:\pyRevit-Master\pyRevit\

DEBUG [pyrevit.coreutils.git] New head is: b074f295861b617054c2ad1f6071bba50c885181 > Merge branch 'develop'

DEBUG [pyrevit.versionmgr.updater] Checking new commits on pyrevit repo.

DEBUG [pyrevit.versionmgr.updater] Finding installed repos...

DEBUG [pyrevit.extensions.parser] Parsing directory for extensions of type: <class 'pyrevit.extensions.components.Extension'>

DEBUG [pyrevit.extensions.parser] Searching directory: C:\Users\bschneiderhan\AppData\Roaming\pyRevit\Extensions for components of type: [<class 'pyrevit.extensions.components.Extension'>]

DEBUG [pyrevit.extensions.parser] Parsing directory for extensions of type: <class 'pyrevit.extensions.components.LibraryExtension'>

DEBUG [pyrevit.extensions.parser] Searching directory: C:\Users\bschneiderhan\AppData\Roaming\pyRevit\Extensions for components of type: [<class 'pyrevit.extensions.components.LibraryExtension'>]

DEBUG [pyrevit.extensions.parser] Parsing directory for extensions of type: <class 'pyrevit.extensions.components.Extension'>

DEBUG [pyrevit.extensions.parser] Searching directory: C:\pyRevit-Master\extensions for components of type: [<class 'pyrevit.extensions.components.Extension'>]

DEBUG [pyrevit.extensions.parser] Testing _get_component(s) on: C:\pyRevit-Master\extensions\ACCO.extension

DEBUG [pyrevit.extensions.parser] Testing sub_directory C:\pyRevit-Master\extensions\ACCO.extension for <class 'pyrevit.extensions.components.Extension'>

DEBUG [pyrevit.extensions.genericcomps] Icon file is: ACCO:None

DEBUG [pyrevit.extensions.genericcomps] Media file is: ACCO:None

DEBUG [pyrevit.extensions.genericcomps] Container does not have layout file defined: <type_id '.extension' name 'ACCO' @ 'C:\pyRevit-Master\extensions\ACCO.extension'>

DEBUG [pyrevit.extensions.parser] Successfuly created component: <type_id '.extension' name 'ACCO' @ 'C:\pyRevit-Master\extensions\ACCO.extension'> from: C:\pyRevit-Master\extensions\ACCO.extension

DEBUG [pyrevit.extensions.parser] Extension directory found: <type_id '.extension' name 'ACCO' @ 'C:\pyRevit-Master\extensions\ACCO.extension'>

DEBUG [pyrevit.extensions.parser] Parsing directory for extensions of type: <class 'pyrevit.extensions.components.LibraryExtension'>

DEBUG [pyrevit.extensions.parser] Searching directory: C:\pyRevit-Master\extensions for components of type: [<class 'pyrevit.extensions.components.LibraryExtension'>]

DEBUG [pyrevit.extensions.parser] Testing _get_component(s) on: C:\pyRevit-Master\extensions\ACCO.extension

DEBUG [pyrevit.extensions.parser] Testing sub_directory C:\pyRevit-Master\extensions\ACCO.extension for <class 'pyrevit.extensions.components.LibraryExtension'>

DEBUG [pyrevit.extensions.extpackages] Looking for C:\pyRevit-Master\pyRevit\extensions\extensions.json

DEBUG [pyrevit.extensions.extpackages] Found C:\pyRevit-Master\pyRevit\extensions\extensions.json

DEBUG [pyrevit.extensions.extpackages] Looking for internal package defs under C:\pyRevit-Master\pyRevit\extensions

DEBUG [pyrevit.extensions.extpackages] Found extension folder pyRevitCore.extension

DEBUG [pyrevit.extensions.extpackages] Looking for C:\pyRevit-Master\pyRevit\extensions\pyRevitCore.extension\extension.json

DEBUG [pyrevit.extensions.extpackages] Found extension folder pyRevitDevHooks.extension

DEBUG [pyrevit.extensions.extpackages] Looking for C:\pyRevit-Master\pyRevit\extensions\pyRevitDevHooks.extension\extension.json

DEBUG [pyrevit.extensions.extpackages] Found C:\pyRevit-Master\pyRevit\extensions\pyRevitDevHooks.extension\extension.json

DEBUG [pyrevit.extensions.extpackages] Found extension folder pyRevitDevTools.extension

DEBUG [pyrevit.extensions.extpackages] Looking for C:\pyRevit-Master\pyRevit\extensions\pyRevitDevTools.extension\extension.json

DEBUG [pyrevit.extensions.extpackages] Found C:\pyRevit-Master\pyRevit\extensions\pyRevitDevTools.extension\extension.json

DEBUG [pyrevit.extensions.extpackages] Found extension folder pyRevitTags.extension

DEBUG [pyrevit.extensions.extpackages] Looking for C:\pyRevit-Master\pyRevit\extensions\pyRevitTags.extension\extension.json

DEBUG [pyrevit.extensions.extpackages] Found C:\pyRevit-Master\pyRevit\extensions\pyRevitTags.extension\extension.json

DEBUG [pyrevit.extensions.extpackages] Found extension folder pyRevitTemplates.extension

DEBUG [pyrevit.extensions.extpackages] Looking for C:\pyRevit-Master\pyRevit\extensions\pyRevitTemplates.extension\extension.json

DEBUG [pyrevit.extensions.extpackages] Found C:\pyRevit-Master\pyRevit\extensions\pyRevitTemplates.extension\extension.json

DEBUG [pyrevit.extensions.extpackages] Found extension folder pyRevitTools.extension

DEBUG [pyrevit.extensions.extpackages] Looking for C:\pyRevit-Master\pyRevit\extensions\pyRevitTools.extension\extension.json

DEBUG [pyrevit.extensions.extpackages] Found C:\pyRevit-Master\pyRevit\extensions\pyRevitTools.extension\extension.json

DEBUG [pyrevit.extensions.extpackages] Found extension folder pyRevitTutor.extension

DEBUG [pyrevit.extensions.extpackages] Looking for C:\pyRevit-Master\pyRevit\extensions\pyRevitTutor.extension\extension.json

DEBUG [pyrevit.extensions.extpackages] Found C:\pyRevit-Master\pyRevit\extensions\pyRevitTutor.extension\extension.json

DEBUG [pyrevit.extensions.extpackages] Looking for C:\Users\bschneiderhan\AppData\Roaming\pyRevit\Extensions\extensions.json

DEBUG [pyrevit.extensions.extpackages] Looking for internal package defs under C:\Users\bschneiderhan\AppData\Roaming\pyRevit\Extensions

DEBUG [pyrevit.extensions.extpackages] Looking for C:\pyRevit-Master\extensions\extensions.json

DEBUG [pyrevit.extensions.extpackages] Looking for internal package defs under C:\pyRevit-Master\extensions

DEBUG [pyrevit.extensions.extpackages] Found extension folder ACCO.extension

DEBUG [pyrevit.extensions.extpackages] Looking for C:\pyRevit-Master\extensions\ACCO.extension\extension.json

DEBUG [pyrevit.extensions.extpackages] Found C:\pyRevit-Master\extensions\ACCO.extension\extension.json

DEBUG [pyrevit.versionmgr.updater] Valid third-party extensions for update: [<type_id '.extension' name 'ACCO' @ 'C:\pyRevit-Master\extensions\ACCO.extension'>]

DEBUG [pyrevit.versionmgr.updater] List of thirdparty repos to be updated: [<type 'RepoInfo' head '3f5dcb9fadf82565fecd3cc3ece644fcc24eda17' @ C:\pyRevit-Master\extensions\ACCO.extension\>]

DEBUG [pyrevit.versionmgr.updater] Updating repo: C:\pyRevit-Master\extensions\ACCO.extension\

DEBUG [pyrevit.versionmgr.updater] Updating repo: C:\pyRevit-Master\extensions\ACCO.extension\

DEBUG [pyrevit.versionmgr.updater] Current head is: 3f5dcb9fadf82565fecd3cc3ece644fcc24eda17 > Wipe Filters

DEBUG [pyrevit.coreutils.git] Creating pull signature for username: bschneiderhan

DEBUG [pyrevit.coreutils.git] Making pull options: <type 'RepoInfo' head '3f5dcb9fadf82565fecd3cc3ece644fcc24eda17' @ C:\pyRevit-Master\extensions\ACCO.extension\>

DEBUG [pyrevit.coreutils.git] Making Credentials handler. (Username and password are available butwill not be logged for privacy purposes.)

DEBUG [pyrevit.coreutils.git] Failed git pull: C:\pyRevit-Master\extensions\ACCO.extension\ | 3 conflicts prevent checkout

DEBUG [pyrevit.versionmgr.updater] Failed updating repo: <type 'RepoInfo' head '3f5dcb9fadf82565fecd3cc3ece644fcc24eda17' @ C:\pyRevit-Master\extensions\ACCO.extension\> | 3 conflicts prevent checkout

Traceback:
File "C:\pyRevit-Master\pyRevit\pyrevitlib\pyrevit\versionmgr\updater.py", line 115, in update_repo
updated_repo_info = libgit.git_pull(repo_info)

INFO [pyrevit.versionmgr.updater] Can not update repo: ACCO.extension (Run in debug to see why)

DEBUG [pyrevit.versionmgr.updater] Updating pyrevit repo: C:\pyRevit-Master\pyRevit\

DEBUG [pyrevit.versionmgr.updater] Updating repo: C:\pyRevit-Master\pyRevit\

DEBUG [pyrevit.versionmgr.updater] Current head is: b074f295861b617054c2ad1f6071bba50c885181 > Merge branch 'develop'

DEBUG [pyrevit.coreutils.git] Creating pull signature for username: bschneiderhan

DEBUG [pyrevit.coreutils.git] Making pull options: <type 'RepoInfo' head 'b074f295861b617054c2ad1f6071bba50c885181' @ C:\pyRevit-Master\pyRevit\>

DEBUG [pyrevit.coreutils.git] Successfully pulled repo: C:\pyRevit-Master\pyRevit\

DEBUG [pyrevit.coreutils.git] New head is: b074f295861b617054c2ad1f6071bba50c885181 > Merge branch 'develop'

DEBUG [pyrevit.versionmgr.updater] Successfully updated repo: C:\pyRevit-Master\pyRevit\

INFO [pyrevit.versionmgr.updater] :inbox_tray: Successfully updated: pyRevit to b074f29

INFO [pyrevit.versionmgr.updater] Upgrading settings...

Please let me know if more information is needed from the debugger to correct this issue. I’m not sure if it’s a GitHub issue. The extension is hosted from a private repo on GitHub.

This original issue was due to a missing extension.json file. I needed to add a JSON file to the extensions folder for pyRevit and have a JSON file within my custom extension.

The issue that I’m now running into is pyRevit isn’t able to auto-update my extension anymore. When I run the update button in debug mode, I can find that there is 1 conflict preventing pyRevit from updating my extension, and this points back to line 115 of the updater.py script.

Is there any easy way to identify what the 1 conflict is?

Also, if I run the following phrase, with the necessary credentials, my extension can force update:

pyRevit extensions update %extension% --username="%username%" --password="%password%" --debug

Hi Brandon,

I’m interested to know how you ended up setting up your custom extension. I saw on another thread that you were trying to deploy from a local file rather than a git repository. Did you get that to work out, or did you end up making a git repo?

I also came across the limitations of the CLI “extend” command. I actually used a powershell install script to set up the pyrevit CLI tool, the pyRevit plugin, and its configuration settings, and to copy-paste my custom script from a server location to a standard location on each user’s device, but then I couldn’t find a way to tell pyRevit about my custom extension. :thinking: I’ll need to manually visit each computer station to make sure it is set up via the Settings Menu in pyRevit.

Did you find a way to automate that last step?