Fix 'str' object has no attribute 'dirname'#695
Merged
Conversation
This stacktrace was found when trying to build the manila charm.
Traceback (most recent call last):
File "/snap/charm/796/usr/local/bin/charm-build", line 33, in <module>
sys.exit(load_entry_point('charm-tools==3.0.8.post7+g2463e7a', 'console_scripts', 'charm-build')())
File "/snap/charm/796/usr/local/lib/python3.10/dist-packages/charmtools/build/builder.py", line 1251, in main
build()
File "/snap/charm/796/usr/local/lib/python3.10/dist-packages/charmtools/build/builder.py", line 854, in __call__
self.generate()
File "/snap/charm/796/usr/local/lib/python3.10/dist-packages/charmtools/build/builder.py", line 792, in generate
self.formulate_plan(layers)
File "/snap/charm/796/usr/local/lib/python3.10/dist-packages/charmtools/build/builder.py", line 598, in formulate_plan
self.plan = self.plan_layers(layers, output_files)
File "/snap/charm/796/usr/local/lib/python3.10/dist-packages/charmtools/build/builder.py", line 430, in plan_layers
wh_tactic.combine(existing_tactic)
File "/snap/charm/796/usr/local/lib/python3.10/dist-packages/charmtools/build/tactics.py", line 1117, in combine
self.read()
File "/snap/charm/796/usr/local/lib/python3.10/dist-packages/charmtools/build/tactics.py", line 1194, in read
src = path(self.entity.dirname()) / self.CONS_FILENAME
AttributeError: 'str' object has no attribute 'dirname'
Signed-off-by: Felipe Reyes <felipe.reyes@canonical.com>
gboutry
approved these changes
Apr 3, 2026
wolsen
approved these changes
Apr 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This stacktrace was found when trying to build the manila charm.
Description of change
Checklist
make test?