* patman: ImportError
@ 2020-05-16 11:27 Stefan Bosch
2020-05-16 23:03 ` Simon Glass
0 siblings, 1 reply; 6+ messages in thread
From: Stefan Bosch @ 2020-05-16 11:27 UTC (permalink / raw)
To: u-boot
Hello,
recently, I updated my local repository (U-Boot master). Last commit is
c693f212c5b0433b3a49a89d87cbff28bf78eb87 now. Previously it has been
4df3578119b043d76b86b50077b06898fc2a4f62 (Date: Wed Dec 18 18:25:42
2019 +0100).
Now I get an "ImportError" if I call patman:
u-boot_master$ ./tools/patman/patman --help
Traceback (most recent call last):
File "./tools/patman/patman", line 21, in <module>
from patman import checkpatch
File
"/home/stefan/u-boot_master/tools/patman/../patman/checkpatch.py", line
10, in <module>
from patman import command
File "/home/stefan/u-boot_master/tools/patman/../patman/command.py",
line 8, in <module>
from patman import tools
File "/home/stefan/u-boot_master/tools/patman/../patman/tools.py",
line 13, in <module>
from patman import command
ImportError: cannot import name 'command'
Cause of this 'ImportError' is probably that "from patman import
command" has already been done before in checkpatch.py (circular
dependency). I think the error has to do with your your commit
bf776679a73f3b9eae37aabd2be5754483039cb2 (patman: Move to absolute imports).
My Python version is 3.4.3.
Regards
Stefan Bosch
^ permalink raw reply [flat|nested] 6+ messages in thread
* patman: ImportError
2020-05-16 11:27 patman: ImportError Stefan Bosch
@ 2020-05-16 23:03 ` Simon Glass
2020-05-17 13:55 ` Stefan Bosch
0 siblings, 1 reply; 6+ messages in thread
From: Simon Glass @ 2020-05-16 23:03 UTC (permalink / raw)
To: u-boot
Hi Stefan,
On Sat, 16 May 2020 at 05:27, Stefan Bosch <stefan_b@posteo.net> wrote:
>
> Hello,
>
> recently, I updated my local repository (U-Boot master). Last commit is
> c693f212c5b0433b3a49a89d87cbff28bf78eb87 now. Previously it has been
> 4df3578119b043d76b86b50077b06898fc2a4f62 (Date: Wed Dec 18 18:25:42
> 2019 +0100).
>
> Now I get an "ImportError" if I call patman:
>
> u-boot_master$ ./tools/patman/patman --help
> Traceback (most recent call last):
> File "./tools/patman/patman", line 21, in <module>
> from patman import checkpatch
> File
> "/home/stefan/u-boot_master/tools/patman/../patman/checkpatch.py", line
> 10, in <module>
> from patman import command
> File "/home/stefan/u-boot_master/tools/patman/../patman/command.py",
> line 8, in <module>
> from patman import tools
> File "/home/stefan/u-boot_master/tools/patman/../patman/tools.py",
> line 13, in <module>
> from patman import command
> ImportError: cannot import name 'command'
>
> Cause of this 'ImportError' is probably that "from patman import
> command" has already been done before in checkpatch.py (circular
> dependency). I think the error has to do with your your commit
> bf776679a73f3b9eae37aabd2be5754483039cb2 (patman: Move to absolute imports).
>
> My Python version is 3.4.3.
The circular dependency has been there for some time, but perhaps in
Python 2, not Python 3. My Python is 3.6.9 or 3.7.7.
I sent a patch to break the circular dependency. Can you please try it
and see if it helps?
Regards,
Simon
^ permalink raw reply [flat|nested] 6+ messages in thread
* patman: ImportError
2020-05-16 23:03 ` Simon Glass
@ 2020-05-17 13:55 ` Stefan Bosch
2020-05-20 0:52 ` Simon Glass
0 siblings, 1 reply; 6+ messages in thread
From: Stefan Bosch @ 2020-05-17 13:55 UTC (permalink / raw)
To: u-boot
Hi Simon,
Am 17.05.20 um 01:03 schrieb Simon Glass:
> Hi Stefan,
>
> On Sat, 16 May 2020 at 05:27, Stefan Bosch <stefan_b@posteo.net> wrote:
>>
>> Hello,
>>
>> recently, I updated my local repository (U-Boot master). Last commit is
>> c693f212c5b0433b3a49a89d87cbff28bf78eb87 now. Previously it has been
>> 4df3578119b043d76b86b50077b06898fc2a4f62 (Date: Wed Dec 18 18:25:42
>> 2019 +0100).
>>
>> Now I get an "ImportError" if I call patman:
>>
>> u-boot_master$ ./tools/patman/patman --help
>> Traceback (most recent call last):
>> File "./tools/patman/patman", line 21, in <module>
>> from patman import checkpatch
>> File
>> "/home/stefan/u-boot_master/tools/patman/../patman/checkpatch.py", line
>> 10, in <module>
>> from patman import command
>> File "/home/stefan/u-boot_master/tools/patman/../patman/command.py",
>> line 8, in <module>
>> from patman import tools
>> File "/home/stefan/u-boot_master/tools/patman/../patman/tools.py",
>> line 13, in <module>
>> from patman import command
>> ImportError: cannot import name 'command'
>>
>> Cause of this 'ImportError' is probably that "from patman import
>> command" has already been done before in checkpatch.py (circular
>> dependency). I think the error has to do with your your commit
>> bf776679a73f3b9eae37aabd2be5754483039cb2 (patman: Move to absolute imports).
>>
>> My Python version is 3.4.3.
>
> The circular dependency has been there for some time, but perhaps in
> Python 2, not Python 3. My Python is 3.6.9 or 3.7.7.
>
> I sent a patch to break the circular dependency. Can you please try it
> and see if it helps?
>
> Regards,
> Simon
>
Thanks for your quick reply. I tried your patch, the good news is that
the ImportError for 'command' has been gone. The bad news is that the
same occurs for 'checkpatch' now:
$ ./tools/patman/patman --help
Traceback (most recent call last):
File "./tools/patman/patman", line 21, in <module>
from patman import checkpatch
File
"/home/stefan/u-boot_master/tools/patman/../patman/checkpatch.py", line
11, in <module>
from patman import gitutil
File "/home/stefan/u-boot_master/tools/patman/../patman/gitutil.py",
line 10, in <module>
from patman import checkpatch
ImportError: cannot import name 'checkpatch'
Regards,
Stefan
^ permalink raw reply [flat|nested] 6+ messages in thread
* patman: ImportError
2020-05-17 13:55 ` Stefan Bosch
@ 2020-05-20 0:52 ` Simon Glass
2020-05-20 16:07 ` Stefan Bosch
0 siblings, 1 reply; 6+ messages in thread
From: Simon Glass @ 2020-05-20 0:52 UTC (permalink / raw)
To: u-boot
Hi Stefan,
On Sun, 17 May 2020 at 07:54, Stefan Bosch <stefan_b@posteo.net> wrote:
>
> Hi Simon,
>
> Am 17.05.20 um 01:03 schrieb Simon Glass:
> > Hi Stefan,
> >
> > On Sat, 16 May 2020 at 05:27, Stefan Bosch <stefan_b@posteo.net> wrote:
> >>
> >> Hello,
> >>
> >> recently, I updated my local repository (U-Boot master). Last commit is
> >> c693f212c5b0433b3a49a89d87cbff28bf78eb87 now. Previously it has been
> >> 4df3578119b043d76b86b50077b06898fc2a4f62 (Date: Wed Dec 18 18:25:42
> >> 2019 +0100).
> >>
> >> Now I get an "ImportError" if I call patman:
> >>
> >> u-boot_master$ ./tools/patman/patman --help
> >> Traceback (most recent call last):
> >> File "./tools/patman/patman", line 21, in <module>
> >> from patman import checkpatch
> >> File
> >> "/home/stefan/u-boot_master/tools/patman/../patman/checkpatch.py", line
> >> 10, in <module>
> >> from patman import command
> >> File "/home/stefan/u-boot_master/tools/patman/../patman/command.py",
> >> line 8, in <module>
> >> from patman import tools
> >> File "/home/stefan/u-boot_master/tools/patman/../patman/tools.py",
> >> line 13, in <module>
> >> from patman import command
> >> ImportError: cannot import name 'command'
> >>
> >> Cause of this 'ImportError' is probably that "from patman import
> >> command" has already been done before in checkpatch.py (circular
> >> dependency). I think the error has to do with your your commit
> >> bf776679a73f3b9eae37aabd2be5754483039cb2 (patman: Move to absolute imports).
> >>
> >> My Python version is 3.4.3.
> >
> > The circular dependency has been there for some time, but perhaps in
> > Python 2, not Python 3. My Python is 3.6.9 or 3.7.7.
> >
> > I sent a patch to break the circular dependency. Can you please try it
> > and see if it helps?
> >
> > Regards,
> > Simon
> >
>
> Thanks for your quick reply. I tried your patch, the good news is that
> the ImportError for 'command' has been gone. The bad news is that the
> same occurs for 'checkpatch' now:
>
> $ ./tools/patman/patman --help
> Traceback (most recent call last):
> File "./tools/patman/patman", line 21, in <module>
> from patman import checkpatch
> File
> "/home/stefan/u-boot_master/tools/patman/../patman/checkpatch.py", line
> 11, in <module>
> from patman import gitutil
> File "/home/stefan/u-boot_master/tools/patman/../patman/gitutil.py",
> line 10, in <module>
> from patman import checkpatch
> ImportError: cannot import name 'checkpatch'
OK I will try a new patch.
Which distribution are you using?
Regards,
Simon
^ permalink raw reply [flat|nested] 6+ messages in thread
* patman: ImportError
2020-05-20 0:52 ` Simon Glass
@ 2020-05-20 16:07 ` Stefan Bosch
2020-05-26 15:07 ` Stefan Bosch
0 siblings, 1 reply; 6+ messages in thread
From: Stefan Bosch @ 2020-05-20 16:07 UTC (permalink / raw)
To: u-boot
Hi Simon,
Am 20.05.20 um 02:52 schrieb Simon Glass:
> Hi Stefan,
>
> On Sun, 17 May 2020 at 07:54, Stefan Bosch <stefan_b@posteo.net> wrote:
>>
>> Hi Simon,
>>
>> Am 17.05.20 um 01:03 schrieb Simon Glass:
>>> Hi Stefan,
>>>
>>> On Sat, 16 May 2020 at 05:27, Stefan Bosch <stefan_b@posteo.net> wrote:
>>>>
>>>> Hello,
>>>>
>>>> recently, I updated my local repository (U-Boot master). Last commit is
>>>> c693f212c5b0433b3a49a89d87cbff28bf78eb87 now. Previously it has been
>>>> 4df3578119b043d76b86b50077b06898fc2a4f62 (Date: Wed Dec 18 18:25:42
>>>> 2019 +0100).
>>>>
>>>> Now I get an "ImportError" if I call patman:
>>>>
>>>> u-boot_master$ ./tools/patman/patman --help
>>>> Traceback (most recent call last):
>>>> File "./tools/patman/patman", line 21, in <module>
>>>> from patman import checkpatch
>>>> File
>>>> "/home/stefan/u-boot_master/tools/patman/../patman/checkpatch.py", line
>>>> 10, in <module>
>>>> from patman import command
>>>> File "/home/stefan/u-boot_master/tools/patman/../patman/command.py",
>>>> line 8, in <module>
>>>> from patman import tools
>>>> File "/home/stefan/u-boot_master/tools/patman/../patman/tools.py",
>>>> line 13, in <module>
>>>> from patman import command
>>>> ImportError: cannot import name 'command'
>>>>
>>>> Cause of this 'ImportError' is probably that "from patman import
>>>> command" has already been done before in checkpatch.py (circular
>>>> dependency). I think the error has to do with your your commit
>>>> bf776679a73f3b9eae37aabd2be5754483039cb2 (patman: Move to absolute imports).
>>>>
>>>> My Python version is 3.4.3.
>>>
>>> The circular dependency has been there for some time, but perhaps in
>>> Python 2, not Python 3. My Python is 3.6.9 or 3.7.7.
>>>
>>> I sent a patch to break the circular dependency. Can you please try it
>>> and see if it helps?
>>>
>>> Regards,
>>> Simon
>>>
>>
>> Thanks for your quick reply. I tried your patch, the good news is that
>> the ImportError for 'command' has been gone. The bad news is that the
>> same occurs for 'checkpatch' now:
>>
>> $ ./tools/patman/patman --help
>> Traceback (most recent call last):
>> File "./tools/patman/patman", line 21, in <module>
>> from patman import checkpatch
>> File
>> "/home/stefan/u-boot_master/tools/patman/../patman/checkpatch.py", line
>> 11, in <module>
>> from patman import gitutil
>> File "/home/stefan/u-boot_master/tools/patman/../patman/gitutil.py",
>> line 10, in <module>
>> from patman import checkpatch
>> ImportError: cannot import name 'checkpatch'
>
> OK I will try a new patch.
>
> Which distribution are you using?
>
> Regards,
> Simon
>
I am using Ubuntu 14.04 (Kernel "3.13.0-170-generic").
Thanks for the new patch. Unfortunately I get the following ImportError now:
$ ./tools/patman/patman --help
Traceback (most recent call last):
File "./tools/patman/patman", line 21, in <module>
from patman import checkpatch
File
"/home/stefan/u-boot_master/tools/patman/../patman/checkpatch.py", line
11, in <module>
from patman import gitutil
File "/home/stefan/u-boot_master/tools/patman/../patman/gitutil.py",
line 12, in <module>
from patman import series
File "/home/stefan/u-boot_master/tools/patman/../patman/series.py",
line 8, in <module>
from patman import get_maintainer
File
"/home/stefan/u-boot_master/tools/patman/../patman/get_maintainer.py",
line 8, in <module>
from patman import gitutil
ImportError: cannot import name 'gitutil'
Regards
Stefan
^ permalink raw reply [flat|nested] 6+ messages in thread
* patman: ImportError
2020-05-20 16:07 ` Stefan Bosch
@ 2020-05-26 15:07 ` Stefan Bosch
0 siblings, 0 replies; 6+ messages in thread
From: Stefan Bosch @ 2020-05-26 15:07 UTC (permalink / raw)
To: u-boot
Hi Simon,
Am 20.05.20 um 18:07 schrieb Stefan Bosch:
> Hi Simon,
>
> Am 20.05.20 um 02:52 schrieb Simon Glass:
>> Hi Stefan,
>>
>> On Sun, 17 May 2020 at 07:54, Stefan Bosch <stefan_b@posteo.net> wrote:
>>>
>>> Hi Simon,
>>>
>>> Am 17.05.20 um 01:03 schrieb Simon Glass:
>>>> Hi Stefan,
>>>>
>>>> On Sat, 16 May 2020 at 05:27, Stefan Bosch <stefan_b@posteo.net> wrote:
>>>>>
>>>>> Hello,
>>>>>
>>>>> recently, I updated my local repository (U-Boot master). Last
>>>>> commit is
>>>>> c693f212c5b0433b3a49a89d87cbff28bf78eb87 now. Previously it has been
>>>>> 4df3578119b043d76b86b50077b06898fc2a4f62 (Date:?? Wed Dec 18 18:25:42
>>>>> 2019 +0100).
>>>>>
>>>>> Now I get an "ImportError" if I call patman:
>>>>>
>>>>> u-boot_master$ ./tools/patman/patman --help
>>>>> Traceback (most recent call last):
>>>>> ???? File "./tools/patman/patman", line 21, in <module>
>>>>> ?????? from patman import checkpatch
>>>>> ???? File
>>>>> "/home/stefan/u-boot_master/tools/patman/../patman/checkpatch.py",
>>>>> line
>>>>> 10, in <module>
>>>>> ?????? from patman import command
>>>>> ???? File
>>>>> "/home/stefan/u-boot_master/tools/patman/../patman/command.py",
>>>>> line 8, in <module>
>>>>> ?????? from patman import tools
>>>>> ???? File
>>>>> "/home/stefan/u-boot_master/tools/patman/../patman/tools.py",
>>>>> line 13, in <module>
>>>>> ?????? from patman import command
>>>>> ImportError: cannot import name 'command'
>>>>>
>>>>> Cause of this 'ImportError' is probably that "from patman import
>>>>> command" has already been done before in checkpatch.py (circular
>>>>> dependency). I think the error has to do with your your commit
>>>>> bf776679a73f3b9eae37aabd2be5754483039cb2 (patman: Move to absolute
>>>>> imports).
>>>>>
>>>>> My Python version is 3.4.3.
>>>>
>>>> The circular dependency has been there for some time, but perhaps in
>>>> Python 2, not Python 3. My Python is 3.6.9 or 3.7.7.
>>>>
>>>> I sent a patch to break the circular dependency. Can you please try it
>>>> and see if it helps?
>>>>
>>>> Regards,
>>>> Simon
>>>>
>>>
>>> Thanks for your quick reply. I tried your patch, the good news is that
>>> the ImportError for 'command' has been gone. The bad news is that the
>>> same occurs for 'checkpatch' now:
>>>
>>> $ ./tools/patman/patman --help
>>> Traceback (most recent call last):
>>> ??? File "./tools/patman/patman", line 21, in <module>
>>> ????? from patman import checkpatch
>>> ??? File
>>> "/home/stefan/u-boot_master/tools/patman/../patman/checkpatch.py", line
>>> 11, in <module>
>>> ????? from patman import gitutil
>>> ??? File "/home/stefan/u-boot_master/tools/patman/../patman/gitutil.py",
>>> line 10, in <module>
>>> ????? from patman import checkpatch
>>> ImportError: cannot import name 'checkpatch'
>>
>> OK I will try a new patch.
>>
>> Which distribution are you using?
>>
>> Regards,
>> Simon
>>
>
> I am using Ubuntu 14.04 (Kernel "3.13.0-170-generic").
>
> Thanks for the new patch. Unfortunately I get the following ImportError
> now:
>
> $ ./tools/patman/patman --help
> Traceback (most recent call last):
> ? File "./tools/patman/patman", line 21, in <module>
> ??? from patman import checkpatch
> ? File
> "/home/stefan/u-boot_master/tools/patman/../patman/checkpatch.py", line
> 11, in <module>
> ??? from patman import gitutil
> ? File "/home/stefan/u-boot_master/tools/patman/../patman/gitutil.py",
> line 12, in <module>
> ??? from patman import series
> ? File "/home/stefan/u-boot_master/tools/patman/../patman/series.py",
> line 8, in <module>
> ??? from patman import get_maintainer
> ? File
> "/home/stefan/u-boot_master/tools/patman/../patman/get_maintainer.py",
> line 8, in <module>
> ??? from patman import gitutil
> ImportError: cannot import name 'gitutil'
>
> Regards
> Stefan
Patman itself is working now with Patch-series v3, thanks a lot for your
efforts. Unfortunately I still have an ImportError when building certain
boards, e.g.
$ make axm_defconfig
$ make -j4 ARCH=arm
CROSS_COMPILE=/opt/gcc-linaro-6.4.1-2018.05-i686_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-
causes the following error:
...
DTOC C spl/dts/dt-platdata.c
LDS spl/u-boot-spl.lds
DTOC H include/generated/dt-structs-gen.h
Traceback (most recent call last):
File "./tools/dtoc/dtoc", line 43, in <module>
from patman import test_util
File "/home/stefan/u-boot_master/tools/dtoc/../patman/test_util.py",
line 14, in <module>
from patman import test_util
ImportError: cannot import name 'test_util'
Traceback (most recent call last):
File "./tools/dtoc/dtoc", line 43, in <module>
from patman import test_util
File "/home/stefan/u-boot_master/tools/dtoc/../patman/test_util.py",
line 14, in <module>
from patman import test_util
ImportError: cannot import name 'test_util'
scripts/Makefile.spl:324: recipe for target
'include/generated/dt-structs-gen.h' failed
make[1]: *** [include/generated/dt-structs-gen.h] Error 1
make[1]: *** Waiting for unfinished jobs....
scripts/Makefile.spl:327: recipe for target 'spl/dts/dt-platdata.c' failed
make[1]: *** [spl/dts/dt-platdata.c] Error 1
Makefile:1934: recipe for target 'spl/u-boot-spl' failed
make: *** [spl/u-boot-spl] Error 2
If I remove "from patman import test_util" in tools/patman/test_util.py
there is no error anymore (at least for the axm board). I think this is
a Bug becuase it is not necessary to import test_util inside itself?!
Regards
Stefan
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-05-26 15:07 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-16 11:27 patman: ImportError Stefan Bosch
2020-05-16 23:03 ` Simon Glass
2020-05-17 13:55 ` Stefan Bosch
2020-05-20 0:52 ` Simon Glass
2020-05-20 16:07 ` Stefan Bosch
2020-05-26 15:07 ` Stefan Bosch
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.