Repo2docker: Syntax error running jupyter-repo2docker

Created on 3 Jan 2019  路  5Comments  路  Source: jupyterhub/repo2docker

I ran into a syntax error after installing jupyter-repo2docker in my conda environment.

I get the following when I try to do anything with jupyter-repo2docker.

admins-mbp-3:~ jacquelineburos$ jupyter-repo2docker --version
Traceback (most recent call last):
  File "/Users/jacquelineburos/anaconda3/bin/jupyter-repo2docker", line 7, in <module>
    from repo2docker.__main__ import main
  File "/Users/jacquelineburos/anaconda3/lib/python3.5/site-packages/repo2docker/__main__.py", line 1, in <module>
    from .app import Repo2Docker
  File "/Users/jacquelineburos/anaconda3/lib/python3.5/site-packages/repo2docker/app.py", line 592
    self.log.info(f'Successfully pushed {self.output_image_spec}', extra=dict(phase='pushing'))
                                                                ^
SyntaxError: invalid syntax

Looks like your python_requires should be updated to >=3.6 since you are using f-strings.

Here is my system setup:

Current conda install:

               platform : osx-64
          conda version : 4.3.22
       conda is private : False
      conda-env version : 4.3.22
    conda-build version : 0+unknown
         python version : 3.5.2.final.0
       requests version : 2.14.2
       root environment : /Users/jacquelineburos/anaconda3  (writable)
    default environment : /Users/jacquelineburos/anaconda3
       envs directories : /Users/jacquelineburos/anaconda3/envs
                          /Users/jacquelineburos/.conda/envs
          package cache : /Users/jacquelineburos/anaconda3/pkgs
                          /Users/jacquelineburos/.conda/pkgs
           channel URLs : https://repo.continuum.io/pkgs/free/osx-64
                          https://repo.continuum.io/pkgs/free/noarch
                          https://repo.continuum.io/pkgs/r/osx-64
                          https://repo.continuum.io/pkgs/r/noarch
                          https://repo.continuum.io/pkgs/pro/osx-64
                          https://repo.continuum.io/pkgs/pro/noarch
            config file : /Users/jacquelineburos/.condarc
             netrc file : None
           offline mode : False
             user-agent : conda/4.3.22 requests/2.14.2 CPython/3.5.2 Darwin/17.7.0 OSX/10.13.6
                UID:GID : 502:20
good first issue help wanted

Most helpful comment

We run (some of) our tests with Python 3.4 to try and help with not introducing these things. I think we should add something like repo2docker --version and/or repo2docker --help to the tests we run to stop this particular bug from coming back as well as making sure users can always get help information.

All 5 comments

Thanks for reporting this! This is a bug on our side, we don't (yet) want to force everyone to run on such a new version of Python. A PR to help remove some/all of the f-strings that have snuck in would be welcome.


Which tool/command did you use to produce the output of all the versions etc installed? I think it is pretty cool and not too verbose. Maybe we should add it to our repertoire as a way of posting information when reporting a bug/problem.

We run (some of) our tests with Python 3.4 to try and help with not introducing these things. I think we should add something like repo2docker --version and/or repo2docker --help to the tests we run to stop this particular bug from coming back as well as making sure users can always get help information.

I think this is fixed in master by #520. We weren't running the 3.4 tests for quite a while due to weirdnesses in the travis matrix, fixed by #527. Running the tests on 3.4 will catch this, I think. I think this issue affects the latest release, though, so we should probably make a new release soon with the fix.

Do you think we can close this then? I was going to test this with Python 3.4 but instead filed #552.

Depends on your process, but i'd say so. It looks like the two main issues are resolved (removing f-strings & adding test cases for py3.4).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

betatim picture betatim  路  6Comments

betatim picture betatim  路  6Comments

choldgraf picture choldgraf  路  5Comments

choldgraf picture choldgraf  路  4Comments

minrk picture minrk  路  3Comments