# Unable to create a Renku project from a custom Renku template and a specific commit

**URL:** <https://renku.discourse.group/t/unable-to-create-a-renku-project-from-a-custom-renku-template-and-a-specific-commit/986>\
**Category:** RenkuLab\
**Created:** [26 January 2024 11:49 UTC](https://renku.discourse.group/t/unable-to-create-a-renku-project-from-a-custom-renku-template-and-a-specific-commit/986 "2024-01-26T11:49:05Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![champost](https://yyz2.discourse-cdn.com/free1/user_avatar/renku.discourse.group/champost/32/232_2.png) [@champost](https://renku.discourse.group/u/champost)\
**Post date:** [26 January 2024 11:49 UTC](https://renku.discourse.group/t/unable-to-create-a-renku-project-from-a-custom-renku-template-and-a-specific-commit/986/1 "2024-01-26T11:49:05Z")

</div>

Hello,

Here is the link to the public Gitlab project on [renkulab.io](http://renkulab.io) : [AMMO -template](https://gitlab.renkulab.io/champak.beeravolureddy/ammo-template)

Creating a new Renku project using the above as a **Custom Template source** (see screenshot below) works as expected with the following commit [AMMO - **824b8daa**](https://gitlab.renkulab.io/champak.beeravolureddy/ammo-template/-/commit/824b8daaa7cb4664d6e6253032864f04e2c4a30a) but surprisingly not with the next commit [AMMO - **8fe97f416**](https://gitlab.renkulab.io/champak.beeravolureddy/ammo-template/-/commit/8fe97f416d2590c256475047b0f0d62bf060c2f8) !

 ![image](https://global.discourse-cdn.com/free1/uploads/renku/original/1X/15e524dac47a66d46d0b72f7e2f07a4af087c145.png)

Creating a new Renku project [AMMO - **8fe97f416**](https://gitlab.renkulab.io/champak.beeravolureddy/ammo-template/-/commit/8fe97f416d2590c256475047b0f0d62bf060c2f8) results in

![image](https://global.discourse-cdn.com/free1/uploads/renku/original/1X/3726f6ac3547b865d0f638891641b87edc6fb7f7.png)

It is all the more surprising given that the only difference between the subsequent commits ( **824b8daa** and **8fe97f416** ) seems to be the addition of two `.ipnyb` files !

Any insight into this unexpected behavior is appreciated, thanks.

---

<div class="post-metadata">

**Author:** ![mohammad-sdsc](https://yyz2.discourse-cdn.com/free1/user_avatar/renku.discourse.group/mohammad-sdsc/32/79_2.png) [@mohammad-sdsc](https://renku.discourse.group/u/mohammad-sdsc)\
**Post date:** [26 January 2024 13:44 UTC](https://renku.discourse.group/t/unable-to-create-a-renku-project-from-a-custom-renku-template-and-a-specific-commit/986/2 "2024-01-26T13:44:34Z")

</div>

Hello @champost,

Thanks for reaching to us and reporting this!

There is a bug in the template rendering code that doesn’t consider cases where a file doesn’t have a valid template format. Unfortunately, there is no workaround for this problem except from removing the file that causes this error: `ammo_project_files/notebooks/Week09/Week 09 (AMMO) solution.ipynb`.

I’ll create a bug report to fix this problem ASAP as it can be blocking for many users.

Kind regards,  
Mohammad

---

<div class="post-metadata">

**Author:** ![champost](https://yyz2.discourse-cdn.com/free1/user_avatar/renku.discourse.group/champost/32/232_2.png) [@champost](https://renku.discourse.group/u/champost)\
**Post date:** [26 January 2024 14:01 UTC](https://renku.discourse.group/t/unable-to-create-a-renku-project-from-a-custom-renku-template-and-a-specific-commit/986/3 "2024-01-26T14:01:40Z")

</div>

Hello @mohammad-sdsc,

I am curios, what exactly is “_a valid template format_” ?  
And why is only `ammo_project_files/notebooks/Week09/Week 09 (AMMO) solution.ipynb` creating a problem (as similar `.ipynb` files have been added in previous commits too) ?

Maybe linking the bug report or Github issue here would be enough…

Thanks !

---

<div class="post-metadata">

**Author:** ![mohammad-sdsc](https://yyz2.discourse-cdn.com/free1/user_avatar/renku.discourse.group/mohammad-sdsc/32/79_2.png) [@mohammad-sdsc](https://renku.discourse.group/u/mohammad-sdsc)\
**Post date:** [26 January 2024 14:46 UTC](https://renku.discourse.group/t/unable-to-create-a-renku-project-from-a-custom-renku-template-and-a-specific-commit/986/4 "2024-01-26T14:46:52Z")

</div>

I meant Jinja template format (and not Renku template). Please see the bug report for a bit of more context: [Crash when rendering template fails during project creation · Issue #3696 · SwissDataScienceCenter/renku-python · GitHub](https://github.com/SwissDataScienceCenter/renku-python/issues/3696)

> And why is only `ammo_project_files/notebooks/Week09/Week 09 (AMMO) solution.ipynb` creating a problem (as similar `.ipynb` files have been added in previous commits too) ?

I couldn’t find what’s the problem with this file that causes this error. Anyways, it’s best not to depend on the file content to be valid when creating a project.

---

<div class="post-metadata">

**Author:** ![champost](https://yyz2.discourse-cdn.com/free1/user_avatar/renku.discourse.group/champost/32/232_2.png) [@champost](https://renku.discourse.group/u/champost)\
**Post date:** [12 February 2024 09:58 UTC](https://renku.discourse.group/t/unable-to-create-a-renku-project-from-a-custom-renku-template-and-a-specific-commit/986/5 "2024-02-12T09:58:37Z")

</div>

@mohammad-sdsc  
I am afraid I didn’t quite follow why Renku was unable to render some .ipynb files as Jinja templates in one specific commit (e.g. **[8fe97f41](https://gitlab.renkulab.io/champak.beeravolureddy/ammo-template/-/commit/8fe97f416d2590c256475047b0f0d62bf060c2f8)**) and encountered no problem with similar files in another commit (e.g. **[824b8daa](https://gitlab.renkulab.io/champak.beeravolureddy/ammo-template/-/commit/824b8daaa7cb4664d6e6253032864f04e2c4a30a)**).

In any case, I see that issue [#3696](https://github.com/SwissDataScienceCenter/renku-python/issues/3696) is now closed so is it supposed to work now ?

---

<div class="post-metadata">

**Author:** ![mohammad-sdsc](https://yyz2.discourse-cdn.com/free1/user_avatar/renku.discourse.group/mohammad-sdsc/32/79_2.png) [@mohammad-sdsc](https://renku.discourse.group/u/mohammad-sdsc)\
**Post date:** [12 February 2024 10:26 UTC](https://renku.discourse.group/t/unable-to-create-a-renku-project-from-a-custom-renku-template-and-a-specific-commit/986/6 "2024-02-12T10:26:13Z")

</div>

The file has some sequence of characters that seems to cause this error (I couldn’t detect what is the sequence). The reason that it doesn’t happen in a previous commit is that the file that causes this error doesn’t exist in that commit.

We will make a `2.9.2` release today that includes the fix to this problem. We cannot fix the issue automatically; what we provide is an `--ignore-template-errors` flag that allows the users to ignore template render errors. So you can create the project and the file with error will be copied as is to the project (won’t be rendered).

Hope this helps!

---

<div class="post-metadata">

**Author:** ![champost](https://yyz2.discourse-cdn.com/free1/user_avatar/renku.discourse.group/champost/32/232_2.png) [@champost](https://renku.discourse.group/u/champost)\
**Post date:** [13 March 2024 09:30 UTC](https://renku.discourse.group/t/unable-to-create-a-renku-project-from-a-custom-renku-template-and-a-specific-commit/986/7 "2024-03-13T09:30:52Z")

</div>

@mohammad-sdsc

If I understood this correctly, I should now be able to create a fresh `renku` project on [renkulab.io](http://renkulab.io) using my **Custom Template source** _i.e._ without resorting to any `renku` command line flags ?

---

<div class="post-metadata">

**Author:** ![mohammad-sdsc](https://yyz2.discourse-cdn.com/free1/user_avatar/renku.discourse.group/mohammad-sdsc/32/79_2.png) [@mohammad-sdsc](https://renku.discourse.group/u/mohammad-sdsc)\
**Post date:** [13 March 2024 10:00 UTC](https://renku.discourse.group/t/unable-to-create-a-renku-project-from-a-custom-renku-template-and-a-specific-commit/986/8 "2024-03-13T10:00:09Z")

</div>

No, this is only in the command-line. If project creation fails on renkulab you should do this and then push your project. Renkulab hasn’t implemented this feature yet.
