Closed aolney closed 2 months ago
Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! :wave:
Welcome to the Jupyter community! :tada:
I just tried this on a new install of Debian 12 with the same result.
I did however get a warning about the version of copier:
This template was designed for Copier 7.1.0, but your version of Copier is 9.2.0. Could could find some incompatibilities.
FWIW the tutorial instructions specify copier=9
when creating the conda env
TL;DR use these steps to workaround
That copier version message was useful; I used the instructions from about Feb listed on Wayback, and was able to get past the pip install -ve .
step:
So my guess is that version change, likely in the dependencies, or a mismatch between the dependencies and the current version of the template, is responsible for this error.
We need to cut a release on this repository for the update to copier 9 to go live
The release with copier 9 was already cut a month ago: https://github.com/jupyterlab/extension-template/releases/tag/v4.3.0 - could it be that you had used a cached version of the template?
Thanks for looking into this. I would guess failure on a fresh install means it's not just a caching issue
I just tried it right now using your exact instructions and it worked without any issue.
I was also using 4.3.0 on jupyterlab-gallery as can be seen in the coper answers file.
@aolney can we compare the answers? Here is my .copier-answers.yml
:
username@host:~/test-ext/jupyterlab-starchat-extension$ cat .copier-answers.yml
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
_commit: v4.3.1
_src_path: https://github.com/jupyterlab/extension-template
author_email: my@test.com
author_name: My name
has_binder: false
has_settings: false
kind: frontend
labextension_name: myextension
project_short_description: A JupyterLab extension.
python_name: myextension
repository: ''
test: false
Curious, if I answer similarly in the interactive copier session, there is no error associated with pip
:
cat .copier-answers.yml
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
_commit: v4.3.1
_src_path: https://github.com/jupyterlab/extension-template
author_email: my@test.com
author_name: My name
has_binder: false
has_settings: false
kind: frontend
labextension_name: myextension
project_short_description: A JupyterLab extension.
python_name: myextension
repository: ''
test: true
However, if I reply with my own answers in the copier interactive session, it fails:
cat .copier-answers.yml
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
_commit: v4.3.1
_src_path: https://github.com/jupyterlab/extension-template
author_email: aolney@memphis.edu
author_name: Andrew Olney
has_binder: true
has_settings: false
kind: frontend
labextension_name: aolney/jupyterlab-starchat-extension
project_short_description: A JupyterLab extension providing an interface to StarChat.
python_name: aolney_jupyterlab_starchat_extension
repository: https://github.com/aolney/jupyterlab-starchat-extension
test: true
Can you identify anything in my answer options that would cause error: metadata-generation-failed
?
I just noticed that I forgot to add @
to the labextension name; not sure if that's critical
Update: I tried again with @
and received the same error. So perhaps it is a parsing problem on one of answer options?
cat .copier-answers.yml
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
_commit: v4.3.1
_src_path: https://github.com/jupyterlab/extension-template
author_email: aolney@memphis.edu
author_name: Andrew Olney
has_binder: true
has_settings: false
kind: frontend
labextension_name: '@aolney/jupyterlab-starchat-extension'
project_short_description: A JupyterLab extension providing an interface to StarChat.
python_name: aolney_jupyterlab_starchat_extension
repository: https://github.com/aolney/jupyterlab-starchat-extension
test: true
I tried using your answers and it also worked smooth for me locally:
package.json
and pyproject.toml
that you get after running the copier?OK I tried again and it bizarrely worked. The only thing I changed was part of the directory/env name so as to not interfere with the working one I built with copier 7. Here are the commands I used:
conda create -n starchat-ext-jl4-TEST python=3.10 jupyterlab=4 nodejs=20 git copier=9 jinja2-time
conda activate starchat-ext-jl4-TEST
mkdir starchat-ext-jl4-TEST
cd starchat-ext-jl4-TEST
copier copy --trust https://github.com/jupyterlab/extension-template .
pip install -ve .
With the same copier answers we discussed above.
I'm not really sure what to make of the erratic behavior. Let me know if you still want the above files or would like me to try anything else. Otherwise perhaps it makes sense to close this as a heisenbug.
@aolney if you still have it, could you paste here the file package.json
in the failing case?
@fcollonval Apologies, I was recreating my tests on top of each other, deleting and recreating the project directory each time. So I no longer have the failing cases to share.
Closing as resolved
Description
Tutorial step
pip install -ve .
results in error:Reproduce
I've tried removing yarn.lock, node_modules, running jlpm install and jlpm install:extension. I've also tried creating a fresh conda env. What's weird is that this worked a month or so ago on the same machine.
Expected behavior
The tutorial steps to run without error.
Context
Troubleshoot Output
Body too long to include