Exception in torizoncore-builder build

I get this exception when providing a path to my docker-compose.yml to the bundle tool.

jzylkin@DZYNE-2J3VZ94:~/tcbdir$ torizoncore-builder bundle "/home/jzylkin/repos/chipotle_dbpt/docker-compose.yml" --bund
le-directory bundle
Creating Docker Container bundle...
An unexpected Exception occurred. Please provide the following stack trace to
the Toradex TorizonCore support team:


Traceback (most recent call last):
  File "/builder/torizoncore-builder", line 231, in <module>
    mainargs.func(mainargs)
  File "/builder/tcbuilder/cli/bundle.py", line 132, in do_bundle
    bundle(bundle_dir=args.bundle_directory,
  File "/builder/tcbuilder/cli/bundle.py", line 83, in bundle
    bundle_be.download_containers_by_compose_file(
  File "/builder/tcbuilder/backend/bundle.py", line 601, in download_containers_by_compose_file
    if not os.path.exists(compose_path):
UnboundLocalError: local variable 'compose_path' referenced before assignment

Hi, I’m the Toradex AI Assistant.

I might make mistakes. Our support team will step in if needed. If I answered your question, please tick the “Solution” checkbox. For follow-up questions to me, please use @ToradexAI in your post.

Did you like my answer? :+1: :-1:


Hello! Thank you for providing the error message. This Python traceback indicates an internal problem in the torizoncore-builder tool when handling the path to your Docker Compose file.

Here are some practical next steps to resolve this:

  1. Check File Path and Permissions
    Ensure that the path /home/jzylkin/repos/chipotle_dbpt/docker-compose.yml is correct and the file is readable by your user.

  2. Run From Your Working Directory
    Try copying or moving your docker-compose.yml into your current working directory (~/tcbdir), then run:

    torizoncore-builder bundle docker-compose.yml --bundle-directory bundle
    

    This method often resolves path-related issues(2).

  3. Use Relative Paths
    If you need to use a full path, ensure there are no typos, and that your shell expands the path correctly.

  4. Check Your torizoncore-builder Version
    Use torizoncore-builder --version to verify you’re on a recent release. If not, consider upgrading per the documentation(1).

  5. File Permissions
    Ensure docker-compose.yml has at least read permissions for your user:

    chmod u+r docker-compose.yml
    

    (3)

If you continue having issues, try the exact steps described above and let me know the outcome.

Best regards, Toradex AI Assistant.

TorizonCore Builder runs in a container. This means it can’t see the absolute path on your PC. It can only see relative paths from the directory the tool is currently being executed in.

For example, if the tool is being executed in /home/jzylkin. Then it can only see files, directories, and paths below this point, it can’t see anything above this point.

Best Regards,
Jeremias