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

Python plugin with core24 and gnome extension broken #5207

Open
sergiusens opened this issue Jan 17, 2025 · 0 comments
Open

Python plugin with core24 and gnome extension broken #5207

sergiusens opened this issue Jan 17, 2025 · 0 comments

Comments

@sergiusens
Copy link
Collaborator

Bug Description

Migration of the core22 plugin logic to core24 is broken.

This might as well be a gnome content snap problem, as such the test cannot be enabled

To Reproduce

Pack the proposed snapcraft.yaml with the sources at https://github.com/canonical/snapcraft/tree/main/tests/spread/plugins/craft-parts/build-and-run-hello/python-hello/src

Environment

spread 24.04

snapcraft.yaml

name: python-hello
version: "1.0"
summary: simple python application
description: build a python application using core22
base: core24
confinement: strict

apps:
  python-hello:
    command: bin/hello
    extensions: [gnome]

parts:
  hello:
    plugin: python
    source: src

Relevant log output

# python-hello
Python path configuration:
  PYTHONHOME = (not set)
  PYTHONPATH = '/snap/python-hello/x1/gnome-platform/usr/lib/python3/dist-packages'
  program name = 'python3'
  isolated = 0
  environment = 1
  user site = 1
  safe_path = 0
  import site = 1
  is in build tree = 0
  stdlib dir = '/snap/gnome-46-2404-sdk/current/usr/lib/python3.12'
  sys._base_executable = '/usr/bin/python3.12'
  sys.base_prefix = '/snap/gnome-46-2404-sdk/current/usr'
  sys.base_exec_prefix = '/snap/gnome-46-2404-sdk/current/usr'
  sys.platlibdir = 'lib'
  sys.executable = '/snap/python-hello/x1/bin/python3'
  sys.prefix = '/snap/gnome-46-2404-sdk/current/usr'
  sys.exec_prefix = '/snap/gnome-46-2404-sdk/current/usr'
  sys.path = [
    '/snap/python-hello/x1/gnome-platform/usr/lib/python3/dist-packages',
    '/snap/gnome-46-2404-sdk/current/usr/lib/python312.zip',
    '/snap/gnome-46-2404-sdk/current/usr/lib/python3.12',
    '/snap/gnome-46-2404-sdk/current/usr/lib/python3.12/lib-dynload',
  ]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'

Current thread 0x00007dc98b0a6740 (most recent call first):
  <no Python frame>

Additional context

No response

sergiusens added a commit that referenced this issue Jan 17, 2025
Issue raised: #5207

Signed-off-by: Sergio Schvezov <[email protected]>
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

No branches or pull requests

1 participant