*how are you passing in the html?*
*
*
*
*
-----------------------
Visit
http://www.superantispyware.com/superantispyware.html?rid=3971 Remove All
The Spyware - Not Just The Easy Ones!
http://1-4-u.info | Don't send insanely long links!
Need a Pick-Me-Up? http://quotes.feedtheguru.com



On Fri, Jul 16, 2010 at 2:44 PM, Caden <[email protected]> wrote:

>
> The calling statement looks like:
>
> render.packet_info(modified)
>
> Also, if I remove most of the HTML and just leave a few table tags, it
> renders without error.  When I reintroduce my code (which is based on
> code tested in a plain non-template python script) the error comes
> back.
>
> On Jul 16, 6:58 am, Greg Milby <[email protected]> wrote:
> > *i'm sure branko will have a better answer :), but it usually means you
> are
> > passing in 3 items in your RENDER statement,  template is looking for
> two.
> > *-----------------------
> > Visithttp://
> www.superantispyware.com/superantispyware.html?rid=3971Remove All
> > The Spyware - Not Just The Easy Ones!http://1-4-u.info| Don't send
> insanely long links!
> > Need a Pick-Me-Up?http://quotes.feedtheguru.com
> >
> > On Fri, Jul 16, 2010 at 7:12 AM, C. Howell <[email protected]> wrote:
> > > I'm wondering if anyone could offer me advice on debugging or fixing
> this
> > > code snippet.
> >
> > > In the code below, get_ether returns a Scapy ethernet object.  This is
> an
> > > html template.   I have other templates working on this same
> > > project/environment which is web.py .34
> >
> > > I've been getting a lot of these errors:
> >
> > > TypeError: emit() takes exactly 2 arguments (3 given)
> >
> > > They're extremely difficult to debug, as they do not point to any
> > > particular place in the template.  I've tried deleting sections of code
> and
> > > reintroducing them, but I have not been able to narrow down the problem
> more
> > > specifically than this section.
> >
> > > Thanks,
> >
> > > Caden
> >
> > > $def with (modified_list)
> > > $# This is where the packet info is formatted for display
> > > <table>
> > >     <caption>Modified</caption>
> > >     $for p in modified_list:
> > >         <tr><td>
> > >         $ temp = p.get_ether()
> > >         <table><tr>
> > >         $while temp is not None:
> > >             <td>
> > >             <table>
> > >             $if temp.fields is not None:
> > >                 $ fields = temp.fields
> > >                 $for key in fields.keys():
> > >                     $if isinstance(fields[key], list) or
> > > isinstance(fields[key], dict) or isinstance(fields[key], tuple) or
> > > isinstance(fields[key], types.NoneType):
> > >                         $pass
> > >                     $else:
> > >
> <tr><td>$key</td><td>$str(fields[key])</td></tr>
> > >             $if temp.payload is not None and len(temp.payload) > 0:
> > >                 $temp = temp.payload
> > >             $else:
> > >                 $temp = None
> > >             </table>
> > >             </td>
> > >         </tr></table>
> > >         </td></tr>
> > > </table>
> >
> > > --
> > > You received this message because you are subscribed to the Google
> Groups
> > > "web.py" group.
> > > To post to this group, send email to [email protected].
> > > To unsubscribe from this group, send email to
> > > [email protected]<webpy%[email protected]><
> webpy%[email protected]<webpy%[email protected]>
> >.
> > > For more options, visit this group at
> > >http://groups.google.com/group/webpy?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "web.py" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected] <webpy%[email protected]>.
> For more options, visit this group at
> http://groups.google.com/group/webpy?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/webpy?hl=en.

Reply via email to