inveniosoftware / training

Invenio v3 Training Material
https://training.readthedocs.io
MIT License
40 stars 45 forks source link

build-images.sh fails at the Invenio Previewer step #90

Closed avivace closed 4 years ago

avivace commented 4 years ago

Environment

I'm trying with a clean Vagrant VM, untouched situation after vagrant up and vagrant ssh. No errors are reported during the VM setting up phase.

Steps to Reproduce

While trying to follow the third tutorial, I run ./docker/build-images.sh and then it stops

Expected behavior

Logs

Context

vagrant@ubuntu-bionic:~/src/my-site$ ./docker/build-images.sh                                                                                                                                                                                
Sending build context to Docker daemon  317.4kB                                                                                                                                                                                              
Step 1/3 : FROM inveniosoftware/centos7-python:3.6                                                                                                                                                                                           
 ---> d207351414dd                                                                                                                                                                                                                           
Step 2/3 : COPY Pipfile Pipfile.lock ./                                                                                                                                                                                                      
 ---> Using cache                                                                                                                                                                                                                            
 ---> ab621130c632                                                                                                                                                                                                                           
Step 3/3 : RUN pipenv install --deploy --system                                                                                                                                                                                              
 ---> Using cache                                                                                                                                                                                                                            
 ---> 6afee51bf358                                                                                                                                                                                                                           
Successfully built 6afee51bf358                                                                                                                                                                                                              
Successfully tagged my-site-base:ba3d35704f4387fbdbe6d0db684a81e57a265493308d80d2caba4152e44e7f3e                                                                                                                                            
Sending build context to Docker daemon    319kB                                                                                                                                                                                              
Step 1/6 : ARG DEPENDENCIES_VERSION=latest                                                                                                                                                                                                   
Step 2/6 : FROM my-site-base:${DEPENDENCIES_VERSION}                                                                                                                                                                                         
 ---> 6afee51bf358                                                                                                                                                                                                                           
Step 3/6 : COPY ./ .                                                                                                                                                                                                                         
 ---> Using cache                                                                                                                                                                                                                            
 ---> 0b52f10dd51f                                                                                                                                                                                                                           
Step 4/6 : COPY ./docker/uwsgi/ ${INVENIO_INSTANCE_PATH}                                                                                                                                                                                     
 ---> Using cache                                                                                                                                                                                                                            
 ---> 199838a1de89                                                                                                                                                                                                                           
Step 5/6 : RUN pip install . &&     invenio collect -v  &&     invenio webpack create &&     invenio webpack install --unsafe &&     invenio webpack build                                                                                   
 ---> Running in f882cd7567e6                                                                                                                                                                                                                
Processing /opt/invenio/src                                                                                                                                                                                                                  
Building wheels for collected packages: my-site                                                                                                                                                                                              
  Building wheel for my-site (setup.py): started                                                                                                                                                                                             
  Building wheel for my-site (setup.py): finished with status 'done'                                                                                                                                                                         
  Created wheel for my-site: filename=my_site-1.0.0-py2.py3-none-any.whl size=24312 sha256=a1e9ba8099b254715d151645822816bb6e39fde62249c9961aefe615d5b5a136                                                                                  
  Stored in directory: /tmp/pip-ephem-wheel-cache-ujejvfd4/wheels/cd/64/dc/8d45ea69b4d5772d61f1bbee2a57f91b275778dcf302a6f83a                                                                                                                
Successfully built my-site                                                                                                                                                                                                                   
Installing collected packages: my-site                                                                                                                                                                                                       
Successfully installed my-site-1.0.0

Error

The above exception was the direct cause of the following exception:
Successfully installed my-site-1.0.0
WARNING: You are using pip version 20.1.1; however, version 20.2.3 is available.                                                                                                                                 
You should consider upgrading via the '/opt/rh/rh-python36/root/usr/bin/python3 -m pip install --upgrade pip' command.
[2020-09-15 09:00:58,354] ERROR in app: Failed to initialize entry point: invenio_previewer = invenio_previewer:InvenioPreviewer
Traceback (most recent call last):
  File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2751, in requires
    deps.extend(dm[safe_extra(ext)])
KeyError: 'execute'
Traceback (most recent call last):
  File "/opt/rh/rh-python36/root/usr/bin/invenio", line 8, in <module>
    sys.exit(cli())
  File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/flask/cli.py", line 586, in main
    return super(FlaskGroup, self).main(*args, **kwargs)
  File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/click/decorators.py", line 21, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/flask/cli.py", line 425, in decorator
    with __ctx.ensure_object(ScriptInfo).load_app().app_context():
  File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/flask/cli.py", line 381, in load_app
    app = call_factory(self, self.create_app)
  File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/flask/cli.py", line 117, in call_factory
    return app_factory(script_info)
  File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/invenio_base/app.py", line 154, in create_cli_app
    app = create_app(debug=get_debug_flag())
  File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/invenio_base/app.py", line 113, in _create_app
    modules=extensions,
  File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/invenio_base/app.py", line 174, in app_loader
    modules=modules)
  File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/invenio_base/app.py", line 233, in _loader
    init_func(ep.load())
  File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2461, in load
    self.require(*args, **kwargs)
  File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2484, in require
    items = working_set.resolve(reqs, env, installer, extras=self.extras)
  File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 794, in resolve
    new_requirements = dist.requires(req.extras)[::-1]
  File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2755, in requires
    ) from e
pkg_resources.UnknownExtra: nbconvert 6.0.2 has no such extra feature 'execute'
ppanero commented 4 years ago

Hi @avivace the error has been fixed here https://github.com/inveniosoftware/invenio-previewer/pull/127 However, it might take a bit until it's released. So for now if you need to proceed you can add nbconvert = {extras = ["execute"], version = ">=4.1.0,<6.0.0"} to your Pipfile. Removing the Pipfile.lock might make things easier to "reinstall".

Hope it helps!

avivace commented 4 years ago

@ppanero I removed the Pipfile.lock, appended nbconvert = {extras = ["execute"], version = ">=4.1.0,<6.0.0"} to Pipfile's dev-dependencies, regenerated the Pipfile.lock file and then ./docker/build-images.sh run with no problem, thanks!