When using a source-depth value, snapcraft fails with: Can't convert 'int' object to str implicitly

Bug #1627772 reported by Leo Arias
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snapcraft
Fix Released
High
Sergio Schvezov

Bug Description

Steps to reproduce:

$ git clone https://github.com/snapcore/snapcraft
$ cd snapcraft/integration_tests/snaps/git-branch
Add source-depth: 1 to the end of the snapcraft.yaml
$ snapcraft

Can't convert 'int' object to str implicitly

This needs an integration test because it was not caught by the unit tests.

Changed in snapcraft:
status: Triaged → In Progress
assignee: nobody → Sergio Schvezov (sergiusens)
milestone: none → 2.19
Revision history for this message
Sergio Schvezov (sergiusens) wrote :
Changed in snapcraft:
status: In Progress → Fix Committed
Changed in snapcraft:
status: Fix Committed → Fix Released
Revision history for this message
berkninan (berkninan) wrote :

A TypeError can occur if the type of an object is not what the Python interpreter expected to see. This error is a common mistake made by beginning developers is to use the '+' operator between values of incompatible types. This error message Can't convert 'int' object to str implicitly is clear, when concatenating strings with integers - you can't directly stick together a string and an integer. So, in order to resolve this problem, you have to explicitly parse the integer to a string by the str() built-in function .

http://net-informations.com/python/err/convert.htm

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.