Unable to create new Snap

Hi,

I am trying to build a new snap for my python GUI application built using Pyside6. following is my setup.py code:

from setuptools import setup, find_packages

def read_requirements():
    with open('requirements.txt', 'r') as req:
        content = req.read()
        requirements = [i for i in content.split('\n') if i and '===' not in i]

    return requirements

setup(
    name= "indusmes",
    version = "0.0.4",
    description= "MES Application from IndusWorks",
    author = "Navneet Jain",
    author_email="navneet@indusworks.in",
    packages = find_packages(where='src'),
    package_dir={'': 'src'},
    package_data={
        'indusmes.backend': ['*.json'],
    },
    install_requires = read_requirements(),
    entry_points={
        'gui_scripts': [
            'indusmes=indusmes.main:main',
        ],
    },
)

Using this I am able to build a .whl file. now when I try to create a snap using snapcraft.yaml file I get this error:

2024-04-24 13:14:55.344 :: 2024-04-24 13:14:54.487 Pack command: ['snap', 'pack', '--filename', 'indusmes_0.1_amd64.snap', '--compression', 'xz', PosixPath('/root/prime'), PosixPath('/root/project')]
2024-04-24 13:14:55.344 :: 2024-04-24 13:14:54.495 Command '['snap', 'pack', '--filename', 'indusmes_0.1_amd64.snap', '--compression', 'xz', PosixPath('/root/prime'), PosixPath('/root/project')]' returned non-zero exit status 1.
2024-04-24 13:14:55.344 :: 2024-04-24 13:14:54.495 Detailed information: 2024/04/24 13:14:54.493805 container.go:215: in snap "indusmes": path "$SNAP/indusmes/main.py" does not exist
2024-04-24 13:14:55.344 :: 2024/04/24 13:14:54.493851 container.go:215: in snap "indusmes": path "$SNAP/indusmes" does not exist
2024-04-24 13:14:55.344 :: 2024/04/24 13:14:54.493856 container.go:215: in snap "indusmes": path "$SNAP" does not exist
2024-04-24 13:14:55.344 :: error: cannot pack "/root/prime": snap is unusable due to missing files
2024-04-24 13:14:55.344 :: 2024-04-24 13:14:54.497 Traceback (most recent call last):
2024-04-24 13:14:55.344 :: 2024-04-24 13:14:54.497   File "/snap/snapcraft/11040/lib/python3.10/site-packages/snapcraft/pack.py", line 137, in pack_snap
2024-04-24 13:14:55.344 :: 2024-04-24 13:14:54.497     proc = subprocess.run(
2024-04-24 13:14:55.344 :: 2024-04-24 13:14:54.497   File "/snap/snapcraft/11040/usr/lib/python3.10/subprocess.py", line 526, in run
2024-04-24 13:14:55.344 :: 2024-04-24 13:14:54.497     raise CalledProcessError(retcode, process.args,
2024-04-24 13:14:55.344 :: 2024-04-24 13:14:54.497 subprocess.CalledProcessError: Command '['snap', 'pack', '--filename', 'indusmes_0.1_amd64.snap', '--compression', 'xz', PosixPath('/root/prime'), PosixPath('/root/project')]' returned non-zero exit status 1.
2024-04-24 13:14:55.345 Executing on host: lxc --project snapcraft config device show local:snapcraft-indusmes-on-amd64-for-amd64-29761575
2024-04-24 13:14:55.407 Executing on host: lxc --project snapcraft config device remove local:snapcraft-indusmes-on-amd64-for-amd64-29761575 disk-/root/project
2024-04-24 13:14:55.487 Executing on host: lxc --project snapcraft stop local:snapcraft-indusmes-on-amd64-for-amd64-29761575
2024-04-24 13:14:59.604 Failed to execute pack in instance.
2024-04-24 13:14:59.607 Traceback (most recent call last):
2024-04-24 13:14:59.607   File "/snap/snapcraft/11040/lib/python3.10/site-packages/snapcraft/parts/lifecycle.py", line 482, in _run_in_provider
2024-04-24 13:14:59.607     instance.execute_run(cmd, check=True, cwd=output_dir)
2024-04-24 13:14:59.607   File "/snap/snapcraft/11040/lib/python3.10/site-packages/craft_providers/lxd/lxd_instance.py", line 293, in execute_run
2024-04-24 13:14:59.608     return self.lxc.exec(
2024-04-24 13:14:59.608   File "/snap/snapcraft/11040/lib/python3.10/site-packages/craft_providers/lxd/lxc.py", line 387, in exec
2024-04-24 13:14:59.608     return runner(final_cmd, timeout=timeout, check=check, **kwargs)
2024-04-24 13:14:59.608   File "/snap/snapcraft/11040/usr/lib/python3.10/subprocess.py", line 526, in run
2024-04-24 13:14:59.608     raise CalledProcessError(retcode, process.args,
2024-04-24 13:14:59.608 subprocess.CalledProcessError: Command '['lxc', '--project', 'snapcraft', 'exec', 'local:snapcraft-indusmes-on-amd64-for-amd64-29761575', '--cwd', '/root/project', '--', 'env', 'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin', 'SNAPCRAFT_MANAGED_MODE=1', 'DEBIAN_FRONTEND=noninteractive', 'DEBCONF_NONINTERACTIVE_SEEN=true', 'DEBIAN_PRIORITY=critical', 'snapcraft', 'pack', '--verbosity=brief', '--build-for', 'amd64']' returned non-zero exit status 1.

following is my snapcraft.yaml code:

name: indusmes
base: core22 
version: '0.1'
summary: manufacturing execution system for IndusWorks
description: |
  This application is a manufacturing execution system for IndusWorks.
  This application is meant to be run on Raspberry Pi 5.

grade: devel 
confinement: devmode 

parts:
  indusmes:
    plugin: python
    source: src

apps:
  indusmes:
    command: $SNAP/indusmes/main.py

Please help!

Remove $SNAP and the first slash and try again…

Hi,

tried by removing $SNAP & /

Still failing. this is the error log:

2024-04-24 13:44:58.815 :: 2024-04-24 13:44:58.404 Pack command: ['snap', 'pack', '--filename', 'indusmes_0.1_amd64.snap', '--compression', 'xz', PosixPath('/root/prime'), PosixPath('/root/project')]
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:58.414 Command '['snap', 'pack', '--filename', 'indusmes_0.1_amd64.snap', '--compression', 'xz', PosixPath('/root/prime'), PosixPath('/root/project')]' returned non-zero exit status 1.
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:58.414 Detailed information: 2024/04/24 13:44:58.411361 container.go:215: in snap "indusmes": path "indusmes/main.py" does not exist
2024-04-24 13:44:58.815 :: 2024/04/24 13:44:58.411393 container.go:215: in snap "indusmes": path "indusmes" does not exist
2024-04-24 13:44:58.815 :: error: cannot pack "/root/prime": snap is unusable due to missing files
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:58.415 Traceback (most recent call last):
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:58.415   File "/snap/snapcraft/11040/lib/python3.10/site-packages/snapcraft/pack.py", line 137, in pack_snap
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:58.415     proc = subprocess.run(
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:58.415   File "/snap/snapcraft/11040/usr/lib/python3.10/subprocess.py", line 526, in run
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:58.415     raise CalledProcessError(retcode, process.args,
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:58.415 subprocess.CalledProcessError: Command '['snap', 'pack', '--filename', 'indusmes_0.1_amd64.snap', '--compression', 'xz', PosixPath('/root/prime'), PosixPath('/root/project')]' returned non-zero exit status 1.
2024-04-24 13:44:58.819 Executing on host: lxc --project snapcraft config device show local:snapcraft-indusmes-on-amd64-for-amd64-29761575
2024-04-24 13:44:58.903 Executing on host: lxc --project snapcraft config device remove local:snapcraft-indusmes-on-amd64-for-amd64-29761575 disk-/root/project
2024-04-24 13:44:58.997 Executing on host: lxc --project snapcraft stop local:snapcraft-indusmes-on-amd64-for-amd64-29761575
2024-04-24 13:45:03.216 Failed to execute pack in instance.
2024-04-24 13:45:03.220 Traceback (most recent call last):
2024-04-24 13:45:03.220   File "/snap/snapcraft/11040/lib/python3.10/site-packages/snapcraft/parts/lifecycle.py", line 482, in _run_in_provider
2024-04-24 13:45:03.220     instance.execute_run(cmd, check=True, cwd=output_dir)
2024-04-24 13:45:03.220   File "/snap/snapcraft/11040/lib/python3.10/site-packages/craft_providers/lxd/lxd_instance.py", line 293, in execute_run
2024-04-24 13:45:03.220     return self.lxc.exec(
2024-04-24 13:45:03.220   File "/snap/snapcraft/11040/lib/python3.10/site-packages/craft_providers/lxd/lxc.py", line 387, in exec
2024-04-24 13:45:03.220     return runner(final_cmd, timeout=timeout, check=check, **kwargs)
2024-04-24 13:45:03.220   File "/snap/snapcraft/11040/usr/lib/python3.10/subprocess.py", line 526, in run
2024-04-24 13:45:03.220     raise CalledProcessError(retcode, process.args,
2024-04-24 13:45:03.220 subprocess.CalledProcessError: Command '['lxc', '--project', 'snapcraft', 'exec', 'local:snapcraft-indusmes-on-amd64-for-amd64-29761575', '--cwd', '/root/project', '--', 'env', 'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin', 'SNAPCRAFT_MANAGED_MODE=1', 'DEBIAN_FRONTEND=noninteractive', 'DEBCONF_NONINTERACTIVE_SEEN=true', 'DEBIAN_PRIORITY=critical', 'snapcraft', 'pack', '--verbosity=brief', '--build-for', 'amd64']' returned non-zero exit status 1.

Also, this is my project folder structure:

Could you show the whole log (or push it to a pastebin site and link it here) that error is just fallout of a former error (which is the actual problem I think) I assume as it says that simply nothing ended up in your snap (the prime/ dir holds the final content as it would be in your snap in the end)

Here is the complete log

2024-04-24 13:44:23.829 Starting Snapcraft 8.0.5
2024-04-24 13:44:23.830 lifecycle command: 'pack', arguments: Namespace(destructive_mode=False, use_lxd=False, debug=False, enable_manifest=False, manifest_image_information=None, bind_ssh=False, build_for=None, http_proxy=None, https_proxy=None, ua_token=None, enable_experimental_ua_services=False, enable_experimental_plugins=False, enable_experimental_extensions=False, enable_developer_debug=False, enable_experimental_target_arch=False, target_arch=None, provider=None, directory=None, output=None)
2024-04-24 13:44:23.830 command: pack, arguments: Namespace(destructive_mode=False, use_lxd=False, debug=False, enable_manifest=False, manifest_image_information=None, bind_ssh=False, build_for=None, http_proxy=None, https_proxy=None, ua_token=None, enable_experimental_ua_services=False, enable_experimental_plugins=False, enable_experimental_extensions=False, enable_developer_debug=False, enable_experimental_target_arch=False, target_arch=None, provider=None, directory=None, output=None)
2024-04-24 13:44:23.834 CPU count (from process affinity): 8
2024-04-24 13:44:23.834 Invalid SNAPCRAFT_MAX_PARALLEL_BUILD_COUNT ''
2024-04-24 13:44:23.834 Running on amd64 for amd64
2024-04-24 13:44:23.835 Checking build provider availability
2024-04-24 13:44:23.839 Retrieved snap config: {}
2024-04-24 13:44:23.839 Using default provider 'lxd' on linux system.
2024-04-24 13:44:24.050 Executing on host: lxc --project default profile show local:default
2024-04-24 13:44:24.129 Using hostname 'snapcraft-indusmes-on-amd64-for-amd64-29761575'
2024-04-24 13:44:24.129 Launching instance...
2024-04-24 13:44:24.129 Executing on host: lxc remote list --format=yaml
2024-04-24 13:44:24.219 Remote 'craft-com.ubuntu.cloud-buildd' already exists.
2024-04-24 13:44:24.219 Executing on host: lxc project list local: --format=yaml
2024-04-24 13:44:24.330 Set LXD instance name to 'snapcraft-indusmes-on-amd64-for-amd64-29761575'
2024-04-24 13:44:24.330 Checking for instance 'snapcraft-indusmes-on-amd64-for-amd64-29761575' in project 'snapcraft' in remote 'local'
2024-04-24 13:44:24.330 Executing on host: lxc --project snapcraft list local: --format=yaml
2024-04-24 13:44:24.490 Instance 'snapcraft-indusmes-on-amd64-for-amd64-29761575' does not exist.
2024-04-24 13:44:24.490 Set LXD instance name to 'base-instance-snapcraft-buildd-base-v70--b255e13f20c5f8adfb3f'
2024-04-24 13:44:24.490 Checking for base instance 'base-instance-snapcraft-buildd-base-v70--b255e13f20c5f8adfb3f' in project 'snapcraft' in remote 'local'
2024-04-24 13:44:24.490 Executing on host: lxc --project snapcraft list local: --format=yaml
2024-04-24 13:44:24.607 Checking validity of instance 'base-instance-snapcraft-buildd-base-v70--b255e13f20c5f8adfb3f'.
2024-04-24 13:44:24.607 Executing on host: lxc --project snapcraft info local:base-instance-snapcraft-buildd-base-v70--b255e13f20c5f8adfb3f
2024-04-24 13:44:24.710 Executing on host: lxc --project snapcraft info local:base-instance-snapcraft-buildd-base-v70--b255e13f20c5f8adfb3f
2024-04-24 13:44:24.793 Executing on host: lxc --project snapcraft config get local:base-instance-snapcraft-buildd-base-v70--b255e13f20c5f8adfb3f user.craft_providers.status
2024-04-24 13:44:24.860 Instance 'base-instance-snapcraft-buildd-base-v70--b255e13f20c5f8adfb3f' is ready.
2024-04-24 13:44:24.860 Instance is valid.
2024-04-24 13:44:24.860 Creating instance from base instance
2024-04-24 13:44:24.860 Creating instance from base instance 'base-instance-snapcraft-buildd-base-v70--b255e13f20c5f8adfb3f'.
2024-04-24 13:44:24.860 Executing on host: lxc --project snapcraft list local: --format=yaml
2024-04-24 13:44:24.990 Executing on host: lxc --project snapcraft copy local:base-instance-snapcraft-buildd-base-v70--b255e13f20c5f8adfb3f local:snapcraft-indusmes-on-amd64-for-amd64-29761575
2024-04-24 13:44:27.723 Executing on host: lxc --project snapcraft list local: --format=yaml
2024-04-24 13:44:27.868 Executing on host: lxc --project snapcraft config set local:snapcraft-indusmes-on-amd64-for-amd64-29761575 raw.idmap 'both 1000 0'
2024-04-24 13:44:27.941 Executing on host: lxc --project snapcraft config get local:snapcraft-indusmes-on-amd64-for-amd64-29761575 raw.idmap
2024-04-24 13:44:28.022 Got LXD idmap for instance 'snapcraft-indusmes-on-amd64-for-amd64-29761575': 'both 1000 0'
2024-04-24 13:44:28.022 Starting instance
2024-04-24 13:44:28.022 Executing on host: lxc --project snapcraft start local:snapcraft-indusmes-on-amd64-for-amd64-29761575
2024-04-24 13:44:28.444 Executing on host: lxc --project snapcraft file push /tmp/tmpmnhavvq3 local:snapcraft-indusmes-on-amd64-for-amd64-29761575/etc/hostname --mode=0644
2024-04-24 13:44:28.526 Executing in container: lxc --project snapcraft exec local:snapcraft-indusmes-on-amd64-for-amd64-29761575 -- env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin SNAPCRAFT_MANAGED_MODE=1 DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true DEBIAN_PRIORITY=critical chown root:root /etc/hostname
2024-04-24 13:44:28.619 Executing in container: lxc --project snapcraft exec local:snapcraft-indusmes-on-amd64-for-amd64-29761575 -- env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin SNAPCRAFT_MANAGED_MODE=1 DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true DEBIAN_PRIORITY=critical hostname -F /etc/hostname
2024-04-24 13:44:28.677 Executing in container: lxc --project snapcraft exec local:snapcraft-indusmes-on-amd64-for-amd64-29761575 -- env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin SNAPCRAFT_MANAGED_MODE=1 DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true DEBIAN_PRIORITY=critical test -f /etc/craft-instance.conf
2024-04-24 13:44:28.793 Executing on host: lxc --project snapcraft file pull local:snapcraft-indusmes-on-amd64-for-amd64-29761575/etc/craft-instance.conf /home/navneetjain89/tmpndqfrhkg.tmp-craft/tmpkoszymaj
2024-04-24 13:44:28.863 Instance has already been setup.
2024-04-24 13:44:28.863 Executing in container: lxc --project snapcraft exec local:snapcraft-indusmes-on-amd64-for-amd64-29761575 -- env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin SNAPCRAFT_MANAGED_MODE=1 DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true DEBIAN_PRIORITY=critical cat /etc/os-release
2024-04-24 13:44:28.934 Executing in container: lxc --project snapcraft exec local:snapcraft-indusmes-on-amd64-for-amd64-29761575 -- env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin SNAPCRAFT_MANAGED_MODE=1 DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true DEBIAN_PRIORITY=critical test -f /etc/craft-instance.conf
2024-04-24 13:44:28.998 Executing on host: lxc --project snapcraft file pull local:snapcraft-indusmes-on-amd64-for-amd64-29761575/etc/craft-instance.conf /home/navneetjain89/tmp9q15leir.tmp-craft/tmpgi_ruh6p
2024-04-24 13:44:29.043 Instance is compatible with compatibility tag 'snapcraft-buildd-base-v7.0'
2024-04-24 13:44:29.043 No cache path set, not mounting cache directories.
2024-04-24 13:44:29.043 Waiting for environment to be ready...
2024-04-24 13:44:29.044 Executing in container: lxc --project snapcraft exec local:snapcraft-indusmes-on-amd64-for-amd64-29761575 -- env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin SNAPCRAFT_MANAGED_MODE=1 DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true DEBIAN_PRIORITY=critical systemctl is-system-running
2024-04-24 13:44:29.168 Waiting for networking to be ready...
2024-04-24 13:44:29.168 Executing in container: lxc --project snapcraft exec local:snapcraft-indusmes-on-amd64-for-amd64-29761575 -- env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin SNAPCRAFT_MANAGED_MODE=1 DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true DEBIAN_PRIORITY=critical getent hosts snapcraft.io
2024-04-24 13:44:29.434 Executing in container: lxc --project snapcraft exec local:snapcraft-indusmes-on-amd64-for-amd64-29761575 -- env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin SNAPCRAFT_MANAGED_MODE=1 DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true DEBIAN_PRIORITY=critical snap unset system proxy.http
2024-04-24 13:44:32.882 Executing in container: lxc --project snapcraft exec local:snapcraft-indusmes-on-amd64-for-amd64-29761575 -- env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin SNAPCRAFT_MANAGED_MODE=1 DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true DEBIAN_PRIORITY=critical snap unset system proxy.https
2024-04-24 13:44:33.104 Installing snap 'snapcraft' with channel=None and classic=True
2024-04-24 13:44:33.104 Installing snap 'snapcraft' from host (classic=True)
2024-04-24 13:44:33.108 Installing base snap 'core22' for 'snapcraft' from host
2024-04-24 13:44:33.108 Installing snap 'core22' from host (classic=False)
2024-04-24 13:44:33.110 Executing in container: lxc --project snapcraft exec local:snapcraft-indusmes-on-amd64-for-amd64-29761575 -- env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin SNAPCRAFT_MANAGED_MODE=1 DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true DEBIAN_PRIORITY=critical test -f /etc/craft-instance.conf
2024-04-24 13:44:33.224 Executing on host: lxc --project snapcraft file pull local:snapcraft-indusmes-on-amd64-for-amd64-29761575/etc/craft-instance.conf /home/navneetjain89/tmpp0gqi7_j.tmp-craft/tmp2b8ejlk6
2024-04-24 13:44:33.321 Revisions found: host='1380', target='1122'
2024-04-24 13:44:33.323 Creating an assert file for snap 'core22'
2024-04-24 13:44:33.324 Executing command on host: ['snap', 'known', 'account-key', 'public-key-sha3-384=BWDEoaqyr25nF5SNCvEv2v7QnM9QsfCc0PBMYD_i2NGSQ32EF2d4D0hqUel3m8ul']
2024-04-24 13:44:33.339 Executing command on host: ['snap', 'known', 'snap-declaration', 'snap-name=core22']
2024-04-24 13:44:33.354 Executing command on host: ['snap', 'known', 'snap-revision', 'snap-revision=1380', 'snap-id=amcUKQILKXHHTlmSa7NMdnXSx02dNeeT']
2024-04-24 13:44:33.369 Executing command on host: ['snap', 'known', 'account', 'account-id=canonical']
2024-04-24 13:44:33.384 Executing in container: lxc --project snapcraft exec local:snapcraft-indusmes-on-amd64-for-amd64-29761575 -- env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin SNAPCRAFT_MANAGED_MODE=1 DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true DEBIAN_PRIORITY=critical test -d /tmp
2024-04-24 13:44:33.549 Executing on host: lxc --project snapcraft file push /home/navneetjain89/tmp1l2qt174.tmp-craft/tmp0jqd2514 local:snapcraft-indusmes-on-amd64-for-amd64-29761575/tmp/core22.assert --gid=0 --uid=0
2024-04-24 13:44:33.642 Executing in container: lxc --project snapcraft exec local:snapcraft-indusmes-on-amd64-for-amd64-29761575 -- env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin SNAPCRAFT_MANAGED_MODE=1 DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true DEBIAN_PRIORITY=critical snap ack /tmp/core22.assert
2024-04-24 13:44:33.901 Executing in container: lxc --project snapcraft exec local:snapcraft-indusmes-on-amd64-for-amd64-29761575 -- env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin SNAPCRAFT_MANAGED_MODE=1 DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true DEBIAN_PRIORITY=critical test -d /tmp
2024-04-24 13:44:34.015 Executing on host: lxc --project snapcraft file push /home/navneetjain89/tmpl61lztxx.tmp-craft/core22.snap local:snapcraft-indusmes-on-amd64-for-amd64-29761575/tmp/core22.snap --gid=0 --uid=0
2024-04-24 13:44:34.279 Executing in container: lxc --project snapcraft exec local:snapcraft-indusmes-on-amd64-for-amd64-29761575 -- env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin SNAPCRAFT_MANAGED_MODE=1 DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true DEBIAN_PRIORITY=critical snap install /tmp/core22.snap
2024-04-24 13:44:35.509 Executing in container: lxc --project snapcraft exec local:snapcraft-indusmes-on-amd64-for-amd64-29761575 -- env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin SNAPCRAFT_MANAGED_MODE=1 DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true DEBIAN_PRIORITY=critical test -f /etc/craft-instance.conf
2024-04-24 13:44:35.624 Executing on host: lxc --project snapcraft file pull local:snapcraft-indusmes-on-amd64-for-amd64-29761575/etc/craft-instance.conf /home/navneetjain89/tmp4vry3ti4.tmp-craft/tmpbkmzp81w
2024-04-24 13:44:35.713 Executing on host: lxc --project snapcraft file push /tmp/tmp9zxbe1oo local:snapcraft-indusmes-on-amd64-for-amd64-29761575/etc/craft-instance.conf --mode=0644
2024-04-24 13:44:35.776 Executing in container: lxc --project snapcraft exec local:snapcraft-indusmes-on-amd64-for-amd64-29761575 -- env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin SNAPCRAFT_MANAGED_MODE=1 DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true DEBIAN_PRIORITY=critical chown root:root /etc/craft-instance.conf
2024-04-24 13:44:35.906 Executing in container: lxc --project snapcraft exec local:snapcraft-indusmes-on-amd64-for-amd64-29761575 -- env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin SNAPCRAFT_MANAGED_MODE=1 DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true DEBIAN_PRIORITY=critical test -f /etc/craft-instance.conf
2024-04-24 13:44:36.071 Executing on host: lxc --project snapcraft file pull local:snapcraft-indusmes-on-amd64-for-amd64-29761575/etc/craft-instance.conf /home/navneetjain89/tmpfqc0dlps.tmp-craft/tmpmoct8zq1
2024-04-24 13:44:36.151 Revisions found: host='11040', target='11040'
2024-04-24 13:44:36.151 Skipping snap injection: target is already up-to-date with revision on host
2024-04-24 13:44:36.208 Setting instance timezone to match host timezone 'Asia/Kolkata'.
2024-04-24 13:44:36.208 Executing on host: lxc --project snapcraft config set local:snapcraft-indusmes-on-amd64-for-amd64-29761575 environment.TZ Asia/Kolkata
2024-04-24 13:44:36.293 Executing on host: lxc --project snapcraft config device show local:snapcraft-indusmes-on-amd64-for-amd64-29761575
2024-04-24 13:44:36.381 Executing on host: lxc --project snapcraft config device add local:snapcraft-indusmes-on-amd64-for-amd64-29761575 disk-/root/project disk source=/home/navneetjain89/projects/indusmes path=/root/project
2024-04-24 13:44:36.465 Executing on host: lxc --project snapcraft file push /tmp/tmp4gi15sdt local:snapcraft-indusmes-on-amd64-for-amd64-29761575/root/.bashrc --mode=644
2024-04-24 13:44:36.528 Executing in container: lxc --project snapcraft exec local:snapcraft-indusmes-on-amd64-for-amd64-29761575 -- env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin SNAPCRAFT_MANAGED_MODE=1 DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true DEBIAN_PRIORITY=critical chown root:root /root/.bashrc
2024-04-24 13:44:36.601 Emitter: Pausing control of the terminal
2024-04-24 13:44:58.601 Emitter: Resuming control of the terminal
2024-04-24 13:44:58.602 Executing in container: lxc --project snapcraft exec local:snapcraft-indusmes-on-amd64-for-amd64-29761575 -- env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin SNAPCRAFT_MANAGED_MODE=1 DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true DEBIAN_PRIORITY=critical test -f /tmp/snapcraft.log
2024-04-24 13:44:58.717 Executing on host: lxc --project snapcraft file pull local:snapcraft-indusmes-on-amd64-for-amd64-29761575/tmp/snapcraft.log /home/navneetjain89/tmplpbt4vc8.tmp-craft/tmpwvywpkid
2024-04-24 13:44:58.814 Logs retrieved from managed instance:
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:39.690 Starting Snapcraft 8.0.5
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:39.691 lifecycle command: 'pack', arguments: Namespace(destructive_mode=False, use_lxd=False, debug=False, enable_manifest=False, manifest_image_information=None, bind_ssh=False, build_for='amd64', http_proxy=None, https_proxy=None, ua_token=None, enable_experimental_ua_services=False, enable_experimental_plugins=False, enable_experimental_extensions=False, enable_developer_debug=False, enable_experimental_target_arch=False, target_arch=None, provider=None, directory=None, output=None)
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:39.691 command: pack, arguments: Namespace(destructive_mode=False, use_lxd=False, debug=False, enable_manifest=False, manifest_image_information=None, bind_ssh=False, build_for='amd64', http_proxy=None, https_proxy=None, ua_token=None, enable_experimental_ua_services=False, enable_experimental_plugins=False, enable_experimental_extensions=False, enable_developer_debug=False, enable_experimental_target_arch=False, target_arch=None, provider=None, directory=None, output=None)
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:39.694 CPU count (from process affinity): 8
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:39.694 Invalid SNAPCRAFT_MAX_PARALLEL_BUILD_COUNT ''
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:39.694 Running on amd64 for amd64
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:39.694 Initializing parts lifecycle
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:39.695 is_snap: True, SNAP_NAME set to snapcraft
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:39.695 process indusmes:Step.PULL
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:39.695 add action indusmes:Step.PULL(ActionType.RUN)
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:39.695 process indusmes:Step.BUILD
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:39.695 add action indusmes:Step.BUILD(ActionType.RUN)
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:39.696 process indusmes:Step.STAGE
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:39.696 add action indusmes:Step.STAGE(ActionType.RUN)
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:39.696 process indusmes:Step.PRIME
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:39.696 add action indusmes:Step.PRIME(ActionType.RUN)
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:39.696 ignore patterns: ['*.snap']
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:39.696 plugin build packages: {'python3-dev', 'python3-venv', 'findutils'}
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:39.696 Installing build-packages
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:39.696 Requested build-packages: ['findutils', 'python3-dev', 'python3-venv']
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:40.670 Marking python3-dev (and its dependencies) to be fetched
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:40.670 package: python3-dev
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:40.677 Marking python3-venv (and its dependencies) to be fetched
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:40.678 package: python3-venv
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:40.691 Marking findutils (and its dependencies) to be fetched
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:40.692 package: findutils
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:40.719 Executing: ['apt-get', 'update']
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:41.148 :: Hit:1 http://archive.ubuntu.com/ubuntu jammy InRelease
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:41.300 :: Get:2 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [119 kB]
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:41.313 :: Get:3 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:41.978 :: Get:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease [109 kB]
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:42.228 :: Get:5 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [1610 kB]
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:42.507 :: Get:6 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages [1392 kB]
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:42.785 :: Get:7 http://archive.ubuntu.com/ubuntu jammy-updates/main Translation-en [303 kB]
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:42.818 :: Get:8 http://archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 Packages [1830 kB]
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:43.051 :: Get:9 http://archive.ubuntu.com/ubuntu jammy-updates/restricted Translation-en [311 kB]
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:43.106 :: Get:10 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [1070 kB]
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:43.385 :: Get:11 http://archive.ubuntu.com/ubuntu jammy-updates/universe Translation-en [244 kB]
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:43.434 :: Get:12 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 Packages [42.7 kB]
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:43.435 :: Get:13 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse Translation-en [10.4 kB]
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:43.719 :: Get:14 http://archive.ubuntu.com/ubuntu jammy-backports/universe amd64 Packages [27.2 kB]
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:44.021 :: Get:15 http://archive.ubuntu.com/ubuntu jammy-backports/universe Translation-en [16.2 kB]
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:44.193 :: Get:16 http://security.ubuntu.com/ubuntu jammy-security/main Translation-en [243 kB]
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:44.240 :: Get:17 http://security.ubuntu.com/ubuntu jammy-security/restricted amd64 Packages [1768 kB]
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:44.626 :: Get:18 http://security.ubuntu.com/ubuntu jammy-security/restricted Translation-en [299 kB]
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:44.670 :: Get:19 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 Packages [848 kB]
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:44.765 :: Get:20 http://security.ubuntu.com/ubuntu jammy-security/universe Translation-en [163 kB]
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:44.921 :: Fetched 10.5 MB in 4s (2541 kB/s)
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:45.617 :: Reading package lists...
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:45.633 Installing packages: findutils python3-dev python3-venv
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:45.669 :: Reading package lists...
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:45.806 :: Building dependency tree...
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:45.806 :: Reading state information...
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:45.938 :: findutils is already the newest version (4.8.0-1ubuntu3).
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:45.939 :: python3-dev is already the newest version (3.10.6-1~22.04).
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:45.939 :: The following additional packages will be installed:
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:45.939 :: python3-pip-whl python3-setuptools-whl python3.10-venv
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:45.957 :: The following NEW packages will be installed:
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:45.958 :: python3-pip-whl python3-setuptools-whl python3-venv python3.10-venv
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:46.530 :: 0 upgraded, 4 newly installed, 0 to remove and 89 not upgraded.
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:46.530 :: Need to get 2474 kB of archives.
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:46.530 :: After this operation, 2890 kB of additional disk space will be used.
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:46.531 :: Get:1 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 python3-pip-whl all 22.0.2+dfsg-1ubuntu0.4 [1680 kB]
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:48.728 :: Get:2 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 python3-setuptools-whl all 59.6.0-1.2ubuntu0.22.04.1 [788 kB]
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:49.427 :: Get:3 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 python3.10-venv amd64 3.10.12-1~22.04.3 [5716 B]
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:49.427 :: Get:4 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 python3-venv amd64 3.10.6-1~22.04 [1038 B]
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:49.576 :: Fetched 2474 kB in 3s (714 kB/s)
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:49.590 :: Selecting previously unselected package python3-pip-whl.
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:49.609 :: (Reading database ... 17522 files and directories currently installed.)
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:49.610 :: Preparing to unpack .../python3-pip-whl_22.0.2+dfsg-1ubuntu0.4_all.deb ...
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:49.611 :: Unpacking python3-pip-whl (22.0.2+dfsg-1ubuntu0.4) ...
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:49.631 :: Selecting previously unselected package python3-setuptools-whl.
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:49.632 :: Preparing to unpack .../python3-setuptools-whl_59.6.0-1.2ubuntu0.22.04.1_all.deb ...
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:49.633 :: Unpacking python3-setuptools-whl (59.6.0-1.2ubuntu0.22.04.1) ...
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:49.652 :: Selecting previously unselected package python3.10-venv.
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:49.653 :: Preparing to unpack .../python3.10-venv_3.10.12-1~22.04.3_amd64.deb ...
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:49.654 :: Unpacking python3.10-venv (3.10.12-1~22.04.3) ...
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:49.669 :: Selecting previously unselected package python3-venv.
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:49.670 :: Preparing to unpack .../python3-venv_3.10.6-1~22.04_amd64.deb ...
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:49.671 :: Unpacking python3-venv (3.10.6-1~22.04) ...
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:49.687 :: Setting up python3-setuptools-whl (59.6.0-1.2ubuntu0.22.04.1) ...
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:49.691 :: Setting up python3-pip-whl (22.0.2+dfsg-1ubuntu0.4) ...
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:49.695 :: Setting up python3.10-venv (3.10.12-1~22.04.3) ...
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:49.733 :: Setting up python3-venv (3.10.6-1~22.04) ...
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:50.057 Found installed version 22.0.2+dfsg-1ubuntu0.4 for package python3-pip-whl
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:50.057 Found installed version 59.6.0-1.2ubuntu0.22.04.1 for package python3-setuptools-whl
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:50.057 Found installed version 3.10.6-1~22.04 for package python3-venv
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:50.057 Found installed version 3.10.12-1~22.04.3 for package python3.10-venv
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:50.058 Installing build-snaps
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:50.859 verify plugin environment for part 'indusmes'
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:50.860 Pulling indusmes
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:50.860 execute action indusmes:Action(part_name='indusmes', step=Step.PULL, action_type=ActionType.RUN, reason=None, project_vars=None, properties=ActionProperties(changed_files=None, changed_dirs=None))
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:50.911 Building indusmes
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:50.912 execute action indusmes:Action(part_name='indusmes', step=Step.BUILD, action_type=ActionType.RUN, reason=None, project_vars=None, properties=ActionProperties(changed_files=None, changed_dirs=None))
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:50.912 load state file: /root/parts/indusmes/state/pull
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:50.915 remove directory /root/parts/indusmes/build
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:50.922 Executing PosixPath('/root/parts/indusmes/run/build.sh')
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:50.927 :: + python3 -m venv /root/parts/indusmes/install
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:53.078 :: + PARTS_PYTHON_VENV_INTERP_PATH=/root/parts/indusmes/install/bin/python3
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:53.078 :: + /root/parts/indusmes/install/bin/pip install -U pip setuptools wheel
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:53.322 :: Requirement already satisfied: pip in /root/parts/indusmes/install/lib/python3.10/site-packages (22.0.2)
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:53.468 :: Collecting pip
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:53.614 ::   Downloading pip-24.0-py3-none-any.whl (2.1 MB)
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:54.823 ::      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 1.8 MB/s eta 0:00:00
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:54.833 :: Requirement already satisfied: setuptools in /root/parts/indusmes/install/lib/python3.10/site-packages (59.6.0)
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:55.058 :: Collecting setuptools
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:55.084 ::   Downloading setuptools-69.5.1-py3-none-any.whl (894 kB)
2024-04-24 13:44:58.814 :: 2024-04-24 13:44:55.565 ::      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 894.6/894.6 KB 1.9 MB/s eta 0:00:00
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:55.609 :: Collecting wheel
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:55.633 ::   Downloading wheel-0.43.0-py3-none-any.whl (65 kB)
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:55.690 ::      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 65.8/65.8 KB 1.3 MB/s eta 0:00:00
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:55.787 :: Installing collected packages: wheel, setuptools, pip
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:55.823 ::   Attempting uninstall: setuptools
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:55.824 ::     Found existing installation: setuptools 59.6.0
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:55.874 ::     Uninstalling setuptools-59.6.0:
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:55.881 ::       Successfully uninstalled setuptools-59.6.0
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:56.188 ::   Attempting uninstall: pip
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:56.188 ::     Found existing installation: pip 22.0.2
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:56.375 ::     Uninstalling pip-22.0.2:
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:56.379 ::       Successfully uninstalled pip-22.0.2
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:57.039 :: Successfully installed pip-24.0 setuptools-69.5.1 wheel-0.43.0
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:57.110 :: + '[' -f setup.py ']'
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:57.110 :: + '[' -f pyproject.toml ']'
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:57.110 :: + find /root/parts/indusmes/install -type f -executable -print0
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:57.111 :: + xargs -0 sed -i '1 s|^#\!/root/parts/indusmes/install/bin/python3.*$|#!/usr/bin/env python3|'
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:57.121 :: ++ set +o
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:57.122 :: ++ grep errexit
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:57.126 :: + opts_state='set +o errexit'
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:57.126 :: + set +e
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:57.126 :: + install_dir=/root/parts/indusmes/install/usr/bin
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:57.126 :: + stage_dir=/root/stage/usr/bin
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:57.127 :: +++ readlink -f /root/parts/indusmes/install/bin/python3
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:57.128 :: ++ basename /usr/bin/python3.10
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:57.128 :: + basename=python3.10
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:57.131 :: + echo Looking for a Python interpreter called '"python3.10"' in the payload...
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:57.132 :: Looking for a Python interpreter called "python3.10" in the payload...
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:57.132 :: ++ find /root/parts/indusmes/install/usr/bin /root/stage/usr/bin -type f -executable -name python3.10 -print -quit
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:57.133 :: + payload_python=
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:57.133 :: + '[' -n '' ']'
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:57.133 :: + echo 'Python interpreter not found in payload.'
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:57.133 :: Python interpreter not found in payload.
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:57.133 :: + symlink_target=/usr/bin/python3.10
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:57.133 :: + '[' -z /usr/bin/python3.10 ']'
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:57.133 :: + eval 'set +o errexit'
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:57.133 :: ++ set +o errexit
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:57.133 :: + ln -sf /usr/bin/python3.10 /root/parts/indusmes/install/bin/python3
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:57.528 Staging indusmes
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:57.529 execute action indusmes:Action(part_name='indusmes', step=Step.STAGE, action_type=ActionType.RUN, reason=None, project_vars=None, properties=ActionProperties(changed_files=None, changed_dirs=None))
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:58.015 Priming indusmes
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:58.015 execute action indusmes:Action(part_name='indusmes', step=Step.PRIME, action_type=ActionType.RUN, reason=None, project_vars=None, properties=ActionProperties(changed_files=None, changed_dirs=None))
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:58.342 patch_elf: not enabled for part 'indusmes'
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:58.343 Extracting and updating metadata...
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:58.343 Copying snap assets...
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:58.344 finalize icon: None
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:58.344 relative icon path: None
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:58.344 Generating snap metadata...
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:58.345 Generated snap metadata
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:58.345 Reading snap metadata...
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:58.346 Running linters...
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:58.346 Running linter: classic
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:58.347 Running linter: library
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:58.396 pack_snap: output=None, compression='xz'
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:58.396 pack_snap: check skeleton
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:58.404 Creating snap package...
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:58.404 Pack command: ['snap', 'pack', '--filename', 'indusmes_0.1_amd64.snap', '--compression', 'xz', PosixPath('/root/prime'), PosixPath('/root/project')]
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:58.414 Command '['snap', 'pack', '--filename', 'indusmes_0.1_amd64.snap', '--compression', 'xz', PosixPath('/root/prime'), PosixPath('/root/project')]' returned non-zero exit status 1.
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:58.414 Detailed information: 2024/04/24 13:44:58.411361 container.go:215: in snap "indusmes": path "indusmes/main.py" does not exist
2024-04-24 13:44:58.815 :: 2024/04/24 13:44:58.411393 container.go:215: in snap "indusmes": path "indusmes" does not exist
2024-04-24 13:44:58.815 :: error: cannot pack "/root/prime": snap is unusable due to missing files
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:58.415 Traceback (most recent call last):
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:58.415   File "/snap/snapcraft/11040/lib/python3.10/site-packages/snapcraft/pack.py", line 137, in pack_snap
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:58.415     proc = subprocess.run(
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:58.415   File "/snap/snapcraft/11040/usr/lib/python3.10/subprocess.py", line 526, in run
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:58.415     raise CalledProcessError(retcode, process.args,
2024-04-24 13:44:58.815 :: 2024-04-24 13:44:58.415 subprocess.CalledProcessError: Command '['snap', 'pack', '--filename', 'indusmes_0.1_amd64.snap', '--compression', 'xz', PosixPath('/root/prime'), PosixPath('/root/project')]' returned non-zero exit status 1.
2024-04-24 13:44:58.819 Executing on host: lxc --project snapcraft config device show local:snapcraft-indusmes-on-amd64-for-amd64-29761575
2024-04-24 13:44:58.903 Executing on host: lxc --project snapcraft config device remove local:snapcraft-indusmes-on-amd64-for-amd64-29761575 disk-/root/project
2024-04-24 13:44:58.997 Executing on host: lxc --project snapcraft stop local:snapcraft-indusmes-on-amd64-for-amd64-29761575
2024-04-24 13:45:03.216 Failed to execute pack in instance.
2024-04-24 13:45:03.220 Traceback (most recent call last):
2024-04-24 13:45:03.220   File "/snap/snapcraft/11040/lib/python3.10/site-packages/snapcraft/parts/lifecycle.py", line 482, in _run_in_provider
2024-04-24 13:45:03.220     instance.execute_run(cmd, check=True, cwd=output_dir)
2024-04-24 13:45:03.220   File "/snap/snapcraft/11040/lib/python3.10/site-packages/craft_providers/lxd/lxd_instance.py", line 293, in execute_run
2024-04-24 13:45:03.220     return self.lxc.exec(
2024-04-24 13:45:03.220   File "/snap/snapcraft/11040/lib/python3.10/site-packages/craft_providers/lxd/lxc.py", line 387, in exec
2024-04-24 13:45:03.220     return runner(final_cmd, timeout=timeout, check=check, **kwargs)
2024-04-24 13:45:03.220   File "/snap/snapcraft/11040/usr/lib/python3.10/subprocess.py", line 526, in run
2024-04-24 13:45:03.220     raise CalledProcessError(retcode, process.args,
2024-04-24 13:45:03.220 subprocess.CalledProcessError: Command '['lxc', '--project', 'snapcraft', 'exec', 'local:snapcraft-indusmes-on-amd64-for-amd64-29761575', '--cwd', '/root/project', '--', 'env', 'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin', 'SNAPCRAFT_MANAGED_MODE=1', 'DEBIAN_FRONTEND=noninteractive', 'DEBCONF_NONINTERACTIVE_SEEN=true', 'DEBIAN_PRIORITY=critical', 'snapcraft', 'pack', '--verbosity=brief', '--build-for', 'amd64']' returned non-zero exit status 1.
2024-04-24 13:45:03.220 Recommended resolution: Run the same command again with --debug to shell into the environment if you wish to introspect this failure.
2024-04-24 13:45:03.221 Full execution log: '/home/navneetjain89/.local/state/snapcraft/log/snapcraft-20240424-134423.822292.log'

Well, that log shows that nothing actually creates any subdir under parts/indusmes/install/, it seems like all your files get installed into the toplevel of the install target, so these files will also end up in the toplevel of your snap … (you’ll likely find main.py in there and not under indusmes/main.py)

Thank you for this, but what changes do I make to my yaml file so that it makes the snap?

For a start, just try to shorten your command: even more … i.e. just make it:

    command: main.py

that refers to a main.py living in the top level and will tell snapcraft to not look for the subdir during package build …

if that doesnt work either, use the --debug option to snapcraft so you get a shell inside the build-container and can then inspect the prime/ directory how the structure of the snap looks like … also see::

https://snapcraft.io/docs/iterating-over-a-build