Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extension volume doesn't support default arguments. Please extend it. #287

Closed
AndreasAZiegler opened this issue Sep 18, 2024 · 1 comment · Fixed by #288
Closed

Extension volume doesn't support default arguments. Please extend it. #287

AndreasAZiegler opened this issue Sep 18, 2024 · 1 comment · Fixed by #288

Comments

@AndreasAZiegler
Copy link

I just noticed that the rocker command I usually use

TERM=xterm rocker --x11 --user --home --privileged --env TERM=xterm --name ros-dev --volume /dev/bus/usb:/dev/bus/usb --volume /data:/data --network=host  -- table-tennis-ros2

is now throwing the error

Extension volume doesn't support default arguments. Please extend it.
Active extensions ['env', 'home', 'name', 'network', 'privileged', 'volume', 'x11', 'user']
Traceback (most recent call last):
  File "/usr/bin/rocker", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/lib/python3.12/site-packages/rocker/cli.py", line 64, in main
    dig = DockerImageGenerator(active_extensions, args_dict, base_image)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/rocker/core.py", line 209, in __init__
    self.dockerfile = generate_dockerfile(active_extensions, self.cliargs, base_image)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/rocker/core.py", line 348, in generate_dockerfile
    dockerfile_str += el.get_snippet(args_dict) + '\n'
                      ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/rocker/extensions.py", line 298, in get_snippet
    return em.expand(snippet, substitutions)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/bin/em.py", line 5961, in expand
    result = interp.expand(data, locals, name, dispatcher=None)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/bin/em.py", line 4681, in expand
    self.string(data, locals, dispatcher)
  File "/usr/bin/em.py", line 4830, in string
    while not self.safe(scanner, True, locals, dispatcher):
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/bin/em.py", line 4862, in safe
    if dispatcher():
       ^^^^^^^^^^^^
  File "/usr/bin/em.py", line 4843, in safe
    return self.parse(scanner, locals)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/bin/em.py", line 4870, in parse
    token = scanner.one()
            ^^^^^^^^^^^^^
  File "/usr/bin/em.py", line 3999, in one
    token.scan(self)
  File "/usr/bin/em.py", line 2648, in scan
    self.subscan(scanner, self.type)
  File "/usr/bin/em.py", line 2664, in subscan
    token = scanner.one()
            ^^^^^^^^^^^^^
  File "/usr/bin/em.py", line 3999, in one
    token.scan(self)
  File "/usr/bin/em.py", line 2648, in scan
    self.subscan(scanner, self.type)
  File "/usr/bin/em.py", line 2664, in subscan
    token = scanner.one()
            ^^^^^^^^^^^^^
  File "/usr/bin/em.py", line 3995, in one
    raise ParseError("unknown markup sequence: `%s%s`%s" % (self.config.prefix, first, self.factory.addendum(first)))
em.ParseError: unknown markup sequence: `@((`; extension markup `@((...))` invoked with no installed extension

There was a docker update vom 1:27.2.0-1 to 1:27.2.1-1 which I assume causes the troubles but I'm not sure.

@tfoote
Copy link
Collaborator

tfoote commented Sep 20, 2024

The deprecation warning at the top about the volume extension default arguments is not the error you're seeing. I opened a PR for fixing that in #288

This looks like an empy parsing issue. Do you have a new version of empy what installation mechanism are you using?

Can you reduce the number of arguments and use a standard image like ubuntu to reproduce the issue?

@cottsay cottsay linked a pull request Sep 20, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants