<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[&#x27;int&#x27; object has no attribute &#x27;startwith&#x27; ERROR when trying to use an image]]></title><description><![CDATA[<p dir="auto">I'm having a problem where I would get the above error when trying to use png / jpg file on the display. Standard images (error.png / default.png) also don't work.<br />
Details of the error say the following:<br />
<em>File "&lt;string&gt;", line 39 in &lt;module&gt;</em> // I think it refers to this line: image0 = M5Img(135, 82, "res/error.png", True)<br />
<em>File "m5stack_ui.py", line 513, in _ <em>init</em> _</em><br />
<em>AttributeError: 'int' object has no attribute 'startswith'</em></p>
<p dir="auto">I tried to re-burn the Core2, load a different program but whenever I add an image I get that error.<br />
This article doesn't say anything more: <a href="https://docs.m5stack.com/en/uiflow/display/graphic" target="_blank" rel="noopener noreferrer nofollow ugc">https://docs.m5stack.com/en/uiflow/display/graphic</a><br />
Thanks!</p>
]]></description><link>https://community.m5stack.com/topic/5805/int-object-has-no-attribute-startwith-error-when-trying-to-use-an-image</link><generator>RSS for Node</generator><lastBuildDate>Sat, 16 May 2026 20:13:15 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/5805.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 14 Nov 2023 11:29:23 GMT</pubDate><ttl>60</ttl></channel></rss>