All of lore.kernel.org
 help / color / mirror / Atom feed
* How to add python debugger "epdb" module in recipe
@ 2020-07-19  7:55 Ashish
  2020-07-20  7:43 ` [poky] " Richard Purdie
  0 siblings, 1 reply; 6+ messages in thread
From: Ashish @ 2020-07-19  7:55 UTC (permalink / raw)
  To: poky

[-- Attachment #1: Type: text/plain, Size: 1039 bytes --]

Hi All ,

- I am trying to add epdb " https://pypi.org/project/epdb/ " in the recipe by
adding *import epdb; epdb.set_trace()* in  the recipe .
But getting error of Exception: ModuleNotFoundError: No module named 'epdb'
*
*
File: '/home/ashish/project/../layers/poky/meta/recipes-devtools/python/python3_3.8.2.bb', lineno: 221, function: __anon_288__home_ashish_edge_gateway_yocto_layers_forked_opencgx_rasberrypi_opencgx_rasberrypi_project____layers_poky_meta_recipes_devtools_python_python3_3_8_2_bb
0217:    # This python changes the datastore based on the contents of a file, so mark
0218:    # that dependency.
0219:    bb.parse.mark_dependency(d, filename)
0220:
**** 0221:    import epdb; epdb.set_trace();*
0222:
0223:    with open(filename) as manifest_file:
0224:        manifest_str =  manifest_file.read()
0225:        json_start = manifest_str.find('# EOC') + 6
*Exception: ModuleNotFoundError: No module named 'epdb'*

Any pointers on same would be helpful ,

--
Thanks ,
Ashish .

[-- Attachment #2: Type: text/html, Size: 1725 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [poky] How to add python debugger "epdb" module in recipe
  2020-07-19  7:55 How to add python debugger "epdb" module in recipe Ashish
@ 2020-07-20  7:43 ` Richard Purdie
  2020-07-20  8:07   ` Ashish
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Purdie @ 2020-07-20  7:43 UTC (permalink / raw)
  To: Ashish, poky

On Sun, 2020-07-19 at 00:55 -0700, Ashish wrote:
> Hi All , 
> 
> - I am trying to add epdb " https://pypi.org/project/epdb/ " in the
> recipe by 
>   adding   import epdb; epdb.set_trace()  in  the recipe . 
>   But getting error of  Exception: ModuleNotFoundError: No module
> named 'epdb'
> 
> File: '/home/ashish/project/../layers/poky/meta/recipes-
> devtools/python/python3_3.8.2.bb', lineno: 221, function:
> __anon_288__home_ashish_edge_gateway_yocto_layers_forked_opencgx_rasb
> errypi_opencgx_rasberrypi_project____layers_poky_meta_recipes_devtool
> s_python_python3_3_8_2_bb
>      0217:    # This python changes the datastore based on the
> contents of a file, so mark
>      0218:    # that dependency.
>      0219:    bb.parse.mark_dependency(d, filename)
>      0220:
>  *** 0221:    import epdb; epdb.set_trace();
>      0222:
>      0223:    with open(filename) as manifest_file:
>      0224:        manifest_str =  manifest_file.read()
>      0225:        json_start = manifest_str.find('# EOC') + 6
> Exception: ModuleNotFoundError: No module named 'epdb'
> 
> Any pointers on same would be helpful , 

I'd guess its running python3-native at that point and python3-native
probably doesn't have the epdb module enabled or installed?

Cheers,

Richard


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [poky] How to add python debugger "epdb" module in recipe
  2020-07-20  7:43 ` [poky] " Richard Purdie
@ 2020-07-20  8:07   ` Ashish
  2020-07-20  9:40     ` Richard Purdie
  0 siblings, 1 reply; 6+ messages in thread
From: Ashish @ 2020-07-20  8:07 UTC (permalink / raw)
  To: Richard Purdie; +Cc: poky

[-- Attachment #1: Type: text/plain, Size: 297 bytes --]

Hi Richard ,

-  Any standard way of getting epdb installed .
    I tried on the Host system  ( Ubuntu ) with similar steps
     on dummy python code and epdb was working fine.

- On this same approach i tried using epdb with few other
   recipe but getting same error .

Thanks
Ashish

[-- Attachment #2: Type: text/html, Size: 580 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [poky] How to add python debugger "epdb" module in recipe
  2020-07-20  8:07   ` Ashish
@ 2020-07-20  9:40     ` Richard Purdie
  2020-07-20 10:15       ` Ashish
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Purdie @ 2020-07-20  9:40 UTC (permalink / raw)
  To: Ashish Mishra; +Cc: poky

On Mon, 2020-07-20 at 13:37 +0530, Ashish Mishra wrote:
> Hi Richard ,
> 
> -  Any standard way of getting epdb installed .
>     I tried on the Host system  ( Ubuntu ) with similar steps
>      on dummy python code and epdb was working fine.
> 
> - On this same approach i tried using epdb with few other 
>    recipe but getting same error .

Looking at the traceback again, its in bitbake code so that is using
python from your host system. I was a little confused as you were in
the python-native recipe for the traceback.

Is epdb installed for your host's python3? Is that the same python3
you're using for bitbake (no buildtools tarball or anything)?

It should work if its available on the system's python3.

Cheers,

Richard




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [poky] How to add python debugger "epdb" module in recipe
  2020-07-20  9:40     ` Richard Purdie
@ 2020-07-20 10:15       ` Ashish
  2020-07-21 14:58         ` Ashish
  0 siblings, 1 reply; 6+ messages in thread
From: Ashish @ 2020-07-20 10:15 UTC (permalink / raw)
  To: Richard Purdie; +Cc: poky

[-- Attachment #1: Type: text/plain, Size: 754 bytes --]

Hi Richard ,

1) Is epdb installed for your host's python3?
     Yes , i installed manually on host using pip3
     I tested by adding "import epdb" in sample python code.
     And i ran on host below command  ( no error of missing module here )
     # pthon3 test-code.py


2) Is that the same python3 you're using for bitbake (no buildtools tarball
or anything)?
     This i think is using python available from Yocto build.
      I haven't specifically passed any parameter here.
      Steps i followed :
      a) Added " import epdb" in recipe ( any yocto recipe)
      b) Ran " bitbake recipe-name "
           Expected was the recipe will find the epdb module.


3) If required i can share detailed steps .


Thanks
Ashish.

[-- Attachment #2: Type: text/html, Size: 2535 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to add python debugger "epdb" module in recipe
  2020-07-20 10:15       ` Ashish
@ 2020-07-21 14:58         ` Ashish
  0 siblings, 0 replies; 6+ messages in thread
From: Ashish @ 2020-07-21 14:58 UTC (permalink / raw)
  To: poky

[-- Attachment #1: Type: text/plain, Size: 331 bytes --]

Hi Richard ,

- Can you please share any pointer on the same .
Or if i am missing something very obvious here .

- I am kind of struck with this error .
As a workaround adding debug print to understand the flow.
If "epdb" works , debugging flow would become much simpler than adding debug prints

--
Thanks ,
Ashish .

[-- Attachment #2: Type: text/html, Size: 419 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-07-21 14:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-19  7:55 How to add python debugger "epdb" module in recipe Ashish
2020-07-20  7:43 ` [poky] " Richard Purdie
2020-07-20  8:07   ` Ashish
2020-07-20  9:40     ` Richard Purdie
2020-07-20 10:15       ` Ashish
2020-07-21 14:58         ` Ashish

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.