Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

An unhandled exception occured, when passing bogus input to bst

Open
#2,077 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
build-system

Research direction

Start with buildstream/scriptelement.py at configure_sandbox() and buildstream/sandbox/sandbox.py at set_work_directory(), following how the relative cwd from the element configuration reaches the assertion. Done when bogus input produces a clear user-facing error instead of an unhandled exception, with regression coverage for this case.

Written by the indexing model from the issue text.

Description

bug

See elements is not an absolute path

# File generated by convert.py

build-depends:
- freedesktop-sdk.bst:components/gtk3.bst
depends: []
sources: []
kind: script
config:
  commands:
  - install -m755 install-licenses.sh /usr/bin
variables:
  cwd: elements

Error message:

    [00:00:00][7aac01d5][   build:licence-extractor.bst         ] BUG     Build                                                                                                                                                             
                                                                                                                                                                                                                                            
        An unhandled exception occured:                                                                                                                                                                                                     
                                                                                                                                                                                                                                            
        Traceback (most recent call last):                                                                                                                                                                                                  
          File "/usr/lib64/python3.13/site-packages/buildstream/_scheduler/jobs/job.py", line 350, in child_action                                                                                                                                      result = self.child_process()  # pylint: disable=assignment-from-no-return                                                                                                                                                      
          File "/usr/lib64/python3.13/site-packages/buildstream/_scheduler/jobs/elementjob.py", line 81, in child_process                                                                                                                               return self._action_cb(self._element)                                                                                                                                                                                           
                   ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^                                                                                                                                                                                           
          File "/usr/lib64/python3.13/site-packages/buildstream/_scheduler/queues/buildqueue.py", line 55, in _assemble_element                                                                                                                         element._assemble()                                                                                                                                                                                                             
            ~~~~~~~~~~~~~~~~~^^                                                                                                                                                                                                             
          File "/usr/lib64/python3.13/site-packages/buildstream/element.py", line 1695, in _assemble                                                                                                                                        
            self.__configure_sandbox(sandbox)                                                                                                                                                                                               
            ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^                                                                                                                                                                                                         File "/usr/lib64/python3.13/site-packages/buildstream/element.py", line 2681, in __configure_sandbox                                                                                                                              
            self.configure_sandbox(sandbox)                                                                                                                                                                                                             ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^                                                                                                                                                                                                 
          File "/usr/lib64/python3.13/site-packages/buildstream/scriptelement.py", line 200, in configure_sandbox                                                                                                                           
            sandbox.set_work_directory(self.__cwd)                                                                                                                                                                                          
            ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^                                                                                                                                                                                          
          File "/usr/lib64/python3.13/site-packages/buildstream/sandbox/sandbox.py", line 149, in set_work_directory                                                                                                                        
            assert directory.startswith("/"), "The working directory must be an absolute path"                                                                                                                                              
                   ~~~~~~~~~~~~~~~~~~~~^^^^^                                                                                                                                                                                                
        AssertionError: The working directory must be an absolute path                                                                                                                                                                      

One would expect only an error message (or alternatively making the path absolute relative to where bst is run from or where project.conf is.

Dominant language
Python
Stars
151
Forks
49
Avg merge
3d 5h
Merged PRs (30d)
6

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/buildstream

All issues in apache/buildstream

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.