remote-build on Mac: NameError: name '_source_handler' is not defined

Bug #1876326 reported by Mathias R on 2020-05-01
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Snapcraft
High
Chris Patterson

Bug Description

I'm working on Mac OS 10.13.6 and want to snap a python script. To build it for amd64 is not a problem but now I want to build it for armhf. So I tried it with remote-build:

snapcraft remote-build --build-on=armhf
All data sent to remote builders will be publicly available. Are you sure you want to continue? [y/N]: y
snapcraft remote-build is experimental and is subject to change - use with caution.
Sorry, an error occurred in Snapcraft:
name '_source_handler' is not defined
Traceback (most recent call last):
  File "/usr/local/bin/snapcraft", line 8, in <module>
    sys.exit(run())
  File "/usr/local/Cellar/snapcraft/3.11/libexec/lib/python3.7/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/Cellar/snapcraft/3.11/libexec/lib/python3.7/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/usr/local/Cellar/snapcraft/3.11/libexec/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/Cellar/snapcraft/3.11/libexec/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/Cellar/snapcraft/3.11/libexec/lib/python3.7/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/Cellar/snapcraft/3.11/libexec/lib/python3.7/site-packages/snapcraft/cli/remote.py", line 161, in remote_build
    package_all_sources=package_all_sources,
  File "/usr/local/Cellar/snapcraft/3.11/libexec/lib/python3.7/site-packages/snapcraft/cli/remote.py", line 188, in _start_build
    repo_dir = wt.prepare_repository()
  File "/usr/local/Cellar/snapcraft/3.11/libexec/lib/python3.7/site-packages/snapcraft/internal/remote_build/_worktree.py", line 322, in prepare_repository
    part_config = self._process_part_sources(part_name, part_config)
  File "/usr/local/Cellar/snapcraft/3.11/libexec/lib/python3.7/site-packages/snapcraft/internal/remote_build/_worktree.py", line 241, in _process_part_sources
    part_config["source"] = self._pull_source(part_name, source)
  File "/usr/local/Cellar/snapcraft/3.11/libexec/lib/python3.7/site-packages/snapcraft/internal/remote_build/_worktree.py", line 163, in _pull_source
    source_handler = self._get_part_source_handler(part_name, source, download_dir)
  File "/usr/local/Cellar/snapcraft/3.11/libexec/lib/python3.7/site-packages/snapcraft/internal/remote_build/_worktree.py", line 93, in _get_part_source_handler
    source, source_type=source_type
  File "/usr/local/Cellar/snapcraft/3.11/libexec/lib/python3.7/site-packages/snapcraft/internal/sources/__init__.py", line 170, in get_source_handler
    return _source_handler[source_type]
NameError: name '_source_handler' is not defined
We would appreciate it if you created a bug report at

Sergio Schvezov (sergiusens) wrote :

These code paths would need to be enabled for Mac

Changed in snapcraft:
status: New → Triaged
importance: Undecided → High
assignee: nobody → Chris Patterson (cjp256)
tags: removed: python
Chris Patterson (cjp256) on 2020-05-04
Changed in snapcraft:
status: Triaged → In Progress
Chris Patterson (cjp256) wrote :

Hello Mathias, sorry about that! You may be our first user of remote-build on OSX :)

I've opened a PR which will address this issue. https://github.com/snapcore/snapcraft/pull/3106

I also borrowed a Macbook and gave it a quick test. Looks like it should be OK now!

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers