{"action":"closed","issue":{"url":"https://api.github.com/repos/micropython/micropython/issues/3004","repository_url":"https://api.github.com/repos/micropython/micropython","labels_url":"https://api.github.com/repos/micropython/micropython/issues/3004/labels{/name}","comments_url":"https://api.github.com/repos/micropython/micropython/issues/3004/comments","events_url":"https://api.github.com/repos/micropython/micropython/issues/3004/events","html_url":"https://github.com/micropython/micropython/issues/3004","id":219855873,"node_id":"MDU6SXNzdWUyMTk4NTU4NzM=","number":3004,"title":"Assertion failure when passing message containing '%' to mp_obj_new_exception_msg","user":{"login":"stinos","id":1902997,"node_id":"MDQ6VXNlcjE5MDI5OTc=","avatar_url":"https://avatars3.githubusercontent.com/u/1902997?v=4","gravatar_id":"","url":"https://api.github.com/users/stinos","html_url":"https://github.com/stinos","followers_url":"https://api.github.com/users/stinos/followers","following_url":"https://api.github.com/users/stinos/following{/other_user}","gists_url":"https://api.github.com/users/stinos/gists{/gist_id}","starred_url":"https://api.github.com/users/stinos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stinos/subscriptions","organizations_url":"https://api.github.com/users/stinos/orgs","repos_url":"https://api.github.com/users/stinos/repos","events_url":"https://api.github.com/users/stinos/events{/privacy}","received_events_url":"https://api.github.com/users/stinos/received_events","type":"User","site_admin":false},"labels":[{"id":71536042,"node_id":"MDU6TGFiZWw3MTUzNjA0Mg==","url":"https://api.github.com/repos/micropython/micropython/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-04-06T10:38:15Z","updated_at":"2018-12-10T05:20:22Z","closed_at":"2018-12-10T05:20:22Z","author_association":"CONTRIBUTOR","body":"Passing a message which contains the `%` character causes the `assert(*fmt == '%' || !\"unsupported fmt char\");` assert in mpprint.c because mp_obj_new_exception_msg just forwards to mp_obj_new_exception_msg_varg and that one passes anything containing `%` through a printf - which is not needed/wanted in this case. This was probably done to reuse the implementation, but also means messages containing `%` cannot be used with any of the widely used mp_obj_new_exception_msg/mp_raise_msg functions.\r\n\r\nThis is low priority but it's a bit inconvenient when re-raising messages from external libraries which can contain anything in their error message (figured this out using the pyserial library).."}}
{"actor":{"display_login":"dpgeorge"}}