<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>9230</bug_id>
          
          <creation_ts>2016-03-09 04:57:08 +0000</creation_ts>
          <short_desc>Tracebacks sometimes apparently truncated</short_desc>
          <delta_ts>2016-04-04 15:06:00 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>BitBake</product>
          <component>bitbake</component>
          <version>2.0</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>2.1 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Paul Eggleton">bluelightning</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>59818</commentid>
    <comment_count>0</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2016-03-09 04:57:08 +0000</bug_when>
    <thetext>I sometimes hit situations working on BitBake code where a printed exception traceback is truncated - the function where the exception is occurring isn&apos;t listed, instead it stops a function or two prior.

A trivial reproducer for this was the missing argument to ParameterError in fetch2/npm.py; simply run the following:

recipetool create npm://registry.npmjs.org

This should try to raise ParameterError except the requisite number of arguments haven&apos;t been passed; so what you get is a TypeError; however the last line in the trace isn&apos;t the errant one. Here&apos;s what I get:

---------- snip ----------
Traceback (most recent call last):
  File &quot;/home/paul/poky/poky/scripts/recipetool&quot;, line 116, in &lt;module&gt;
    ret = main()
  File &quot;/home/paul/poky/poky/scripts/recipetool&quot;, line 107, in main
    ret = args.func(args)
  File &quot;/home/paul/poky/poky/scripts/lib/recipetool/create.py&quot;, line 366, in create_recipe
    checksums = scriptutils.fetch_uri(tinfoil.config_data, fetchuri, srctree, srcrev)
  File &quot;/home/paul/poky/poky/scripts/lib/scriptutils.py&quot;, line 85, in fetch_uri
    fetcher = bb.fetch2.Fetch([uri], localdata)
  File &quot;/home/paul/poky/poky/bitbake/lib/bb/fetch2/__init__.py&quot;, line 1493, in __init__
    self.ud[url] = FetchData(url, d, localonly)
TypeError: __init__() takes exactly 3 arguments (2 given)
---------- snip ----------

(Note that I&apos;ve sent a patch to pass the correct number of arguments, so if that&apos;s been merged you&apos;ll naturally need to revert it locally to see this again.)

At a guess, this may have something to do with the object structure and the indirection that&apos;s being used (i.e. the call to self.method.urldata_init(self, d)). I&apos;m unsure as to whether all of this is caused by a bug in our code or just a general python bug though.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60744</commentid>
    <comment_count>1</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2016-04-04 15:06:00 +0000</bug_when>
    <thetext>http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=c37d5426b1872d29347c1fecd9bda7b455fa15e0</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>