# An error during the extension distribution

**URL:** <https://discourse.slicer.org/t/an-error-during-the-extension-distribution/24027>\
**Category:** Support\
**Tags:** extensions-manager, python, extensions\
**Created:** [June 24, 2022, 2:01pm UTC](https://discourse.slicer.org/t/an-error-during-the-extension-distribution/24027 "2022-06-24T14:01:45Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![CharlesChen](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/charleschen/32/8444_2.png) [@CharlesChen](https://discourse.slicer.org/u/CharlesChen)\
**Post date:** [June 24, 2022, 2:01pm UTC](https://discourse.slicer.org/t/an-error-during-the-extension-distribution/24027/1 "2022-06-24T14:01:45Z")

</div>

System: Win 10  
Version: 5.0.2  
Hello,  
I’m new to 3DSlicer, I developed a python scripted extension, which is for computing the percentage of colocalization(Spatial overlap between different channels) of Z-stack TIFF images.

I followed the steps provided in the [Distribute an extension](https://slicer.readthedocs.io/en/latest/developer_guide/extensions.html#distribute-an-extension) section to submit my extension to the extension index.

Since I want to make the extension appear in the latest stable version of the slicer, I chose to upload my extension description (s4ext) file to the 5.0 branch on the Slicer Extensions Index page.

Here are the steps I took:

1. Click the “Fork” button on the [Slicer Extensions Index 5.0 branch](https://github.com/Slicer/ExtensionsIndex/tree/5.0) to create a fork in my personal account.

2. Switch to the 5.0 branch on my forked repository and clicked the “Upload Files” button to upload my extension description (s4ext) file:  

However, I encountered an error while creating the pull request:

 ![figure5](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/d/9/d9bea9fed863c4a98c2de4c998aad1c666d15e55.png)  
 ![figure6](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/9/b/9b001906eb7556ece90ee04f02a48d556a9e7951.png)

```auto
#!/bin/bash -eo pipefail
if [[$CIRCLE_PULL_REQUEST != ""]]; then
  for base_branch in origin/master $(git branch -r | grep -E "origin\/[0-9](\.[0-9])+" | sort -r); do
    differences=$(git diff $base_branch --name-only)
    if [[$differences != ""]]; then
      break
    fi
  done
else
  base_branch=$CIRCLE_BRANCH
fi
echo "export BASE_BRANCH=\"$base_branch\"" >> $BASH_ENV

fatal: ambiguous argument 'origin/master': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

Exited with code exit status 128
CircleCI received exit code 128

```

Are there any specific solutions and suggestions?  
Really appreciate your help in advance!

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [June 24, 2022, 3:09pm UTC](https://discourse.slicer.org/t/an-error-during-the-extension-distribution/24027/2 "2022-06-24T15:09:42Z")

</div>

We just switched over from changing the main branch name from `master` to `main` yesterday. Maybe you got the error message because of that. You now need to create a pull request to merge into the `main` branch.

---

<div class="post-metadata">

**Author:** ![CharlesChen](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/charleschen/32/8444_2.png) [@CharlesChen](https://discourse.slicer.org/u/CharlesChen)\
**Post date:** [June 24, 2022, 3:28pm UTC](https://discourse.slicer.org/t/an-error-during-the-extension-distribution/24027/3 "2022-06-24T15:28:03Z")

</div>

Hello @lassoan,  
Thank you so much for your kind reply.  
According to your suggestion, here are the steps I will do:

1. Click the “Fork” button on the [Slicer Extensions Index main branch](https://github.com/Slicer/ExtensionsIndex/) to create a fork in my personal account.

2. Switch to the main branch on my forked repository and click the “Upload Files” button to upload my extension description (s4ext) file.

3. Create a pull request

Is that correct for me to make the extension appear in the latest stable version of the slicer(5.0)?  
In addition, do I also need to change the ‘scmrevision’ in my extension description (s4ext) file **from 5.0 to main**?  
Thank you!

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [June 24, 2022, 4:46pm UTC](https://discourse.slicer.org/t/an-error-during-the-extension-distribution/24027/4 "2022-06-24T16:46:45Z")

</div>

Your current submission (for Slicer-5.0) is already [under review](https://github.com/Slicer/ExtensionsIndex/pull/1847). If the review is completed then we can add it for both the `main` and `5.0` branches.

---

<div class="post-metadata">

**Author:** ![CharlesChen](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/charleschen/32/8444_2.png) [@CharlesChen](https://discourse.slicer.org/u/CharlesChen)\
**Post date:** [June 24, 2022, 5:21pm UTC](https://discourse.slicer.org/t/an-error-during-the-extension-distribution/24027/5 "2022-06-24T17:21:29Z")

</div>

Hello @lassoan，  
Thank you very much for your help and affirmation! First of all, I’ll get back to you after consulting with my supervisor about the license issue, and I’ll follow your tips to address those few tweaks. Also, I really willing to learn how to make the computation faster during the coming project week.  
Best regards!

---

<div class="post-metadata">

**Author:** ![CharlesChen](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/charleschen/32/8444_2.png) [@CharlesChen](https://discourse.slicer.org/u/CharlesChen)\
**Post date:** [June 24, 2022, 6:27pm UTC](https://discourse.slicer.org/t/an-error-during-the-extension-distribution/24027/6 "2022-06-24T18:27:39Z")

</div>

Hello @lassoan,  
It seems I missed the last preparation meeting, which was held on June 21st.  
Therefore, is it still possible for me to create my project page and share it with slicer experts during the coming week?  
Thanks!

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [June 24, 2022, 6:36pm UTC](https://discourse.slicer.org/t/an-error-during-the-extension-distribution/24027/7 "2022-06-24T18:36:16Z")

</div>

Yes, you can still register and add your project page.

---

<div class="post-metadata">

**Author:** ![CharlesChen](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/charleschen/32/8444_2.png) [@CharlesChen](https://discourse.slicer.org/u/CharlesChen)\
**Post date:** [June 30, 2022, 1:12pm UTC](https://discourse.slicer.org/t/an-error-during-the-extension-distribution/24027/8 "2022-06-30T13:12:03Z")

</div>

Hello @lassoan,

> Your current submission (for Slicer-5.0) is already [under review](https://github.com/Slicer/ExtensionsIndex/pull/1847). If the review is completed then we can add it for both the `main` and `5.0` branches.

I’ve just changed the license of my extension to MIT.  
Is this allow the extension to be distributed to 3D Slicer now? Once my extension is distributed, it can be searched and downloaded from the ‘Extension manager’, is that correct?  
Thanks!

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [July 1, 2022, 4:04am UTC](https://discourse.slicer.org/t/an-error-during-the-extension-distribution/24027/9 "2022-07-01T04:04:59Z")

</div>

Thank you. Your extension is now added to the Extensions Index and it will appear in the Extensions Manager in Slicer from tomorrow or the day after. Check the [dashboard](https://slicer.cdash.org/index.php?project=SlicerPreview) for any errors related to your extension tomorrow.

---

<div class="post-metadata">

**Author:** ![CharlesChen](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/charleschen/32/8444_2.png) [@CharlesChen](https://discourse.slicer.org/u/CharlesChen)\
**Post date:** [July 1, 2022, 12:43pm UTC](https://discourse.slicer.org/t/an-error-during-the-extension-distribution/24027/10 "2022-07-01T12:43:08Z")

</div>

Thanks a lot for your help! 👍
