<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.koansoftware.com/index.php?action=history&amp;feed=atom&amp;title=Repo_issue_%22def_print%28self%2C_%2Aargs%2C_%2A%2Akwargs%29%3A%22</id>
	<title>Repo issue &quot;def print(self, *args, **kwargs):&quot; - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.koansoftware.com/index.php?action=history&amp;feed=atom&amp;title=Repo_issue_%22def_print%28self%2C_%2Aargs%2C_%2A%2Akwargs%29%3A%22"/>
	<link rel="alternate" type="text/html" href="https://wiki.koansoftware.com/index.php?title=Repo_issue_%22def_print(self,_*args,_**kwargs):%22&amp;action=history"/>
	<updated>2026-06-01T22:32:42Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.15</generator>
	<entry>
		<id>https://wiki.koansoftware.com/index.php?title=Repo_issue_%22def_print(self,_*args,_**kwargs):%22&amp;diff=341&amp;oldid=prev</id>
		<title>Koan: Created page with &quot;== Repo issue &quot;def print(self, *args, **kwargs):&quot; ==  &#039;&#039;&#039;Symptoms&#039;&#039;&#039;  Trying to initialize a repo, for example:    $ repo init -u https://github.com/nxp-imx/imx-manifest -b im...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.koansoftware.com/index.php?title=Repo_issue_%22def_print(self,_*args,_**kwargs):%22&amp;diff=341&amp;oldid=prev"/>
		<updated>2023-12-06T10:33:01Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;== Repo issue &amp;quot;def print(self, *args, **kwargs):&amp;quot; ==  &amp;#039;&amp;#039;&amp;#039;Symptoms&amp;#039;&amp;#039;&amp;#039;  Trying to initialize a repo, for example:    $ repo init -u https://github.com/nxp-imx/imx-manifest -b im...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Repo issue &amp;quot;def print(self, *args, **kwargs):&amp;quot; ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Symptoms&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Trying to initialize a repo, for example: &lt;br /&gt;
&lt;br /&gt;
 $ repo init -u https://github.com/nxp-imx/imx-manifest -b imx-linux-kirkstone -m imx-5.15.52-2.1.0.xml&lt;br /&gt;
&lt;br /&gt;
we have the below log:&lt;br /&gt;
&lt;br /&gt;
 File &amp;quot;/home/username/bin/repo&amp;quot;, line 51&lt;br /&gt;
 def print(self, *args, **kwargs):&lt;br /&gt;
 ^&lt;br /&gt;
 SyntaxError: invalid syntax&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Workaround (1)&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The first workaround consist in change the python alternatives (caused when you have installed two or more python versions).&lt;br /&gt;
&lt;br /&gt;
NOTE: in my case, the python version that i want to change as first priority is python3.8&lt;br /&gt;
&lt;br /&gt;
 $ sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.8 1&lt;br /&gt;
&lt;br /&gt;
Then we run:&lt;br /&gt;
&lt;br /&gt;
 $ sudo update-alternatives --config python&lt;br /&gt;
&lt;br /&gt;
To verify if your python priority was changed successfully try:&lt;br /&gt;
&lt;br /&gt;
 $ python --version&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Workaround (2)&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 &lt;br /&gt;
The workaround is very simple, only we need modify the repo file&lt;br /&gt;
&lt;br /&gt;
 $ vi ~/bin/repo&lt;br /&gt;
&lt;br /&gt;
and we will change the python interpreter in the first line (from python to phyton3):&lt;br /&gt;
&lt;br /&gt;
Change this line&lt;br /&gt;
&lt;br /&gt;
 #!/usr/bin/env python&lt;br /&gt;
&lt;br /&gt;
to this line&lt;br /&gt;
&lt;br /&gt;
 #!/usr/bin/env python3&lt;br /&gt;
&lt;br /&gt;
After to do this change, repo will works fine again.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-----&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Credits: [https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/repo-issue-quot-def-print-self-args-kwargs-quot/ta-p/1756521&amp;#039;&amp;#039; NXP Community]&lt;/div&gt;</summary>
		<author><name>Koan</name></author>
	</entry>
</feed>