help with debugging please?

20 views
Skip to first unread message

Samuel Mathieson

unread,
Nov 18, 2017, 6:00:40 AM11/18/17
to brython
Hello,

I am trying to figure out an error in brython but cant understand where the error is.

The error is:

185VM98506:673 Uncaught Error
    at Object._b_.TypeError (eval at $make_exc (brython.js:6441), <anonymous>:121:376)
    at Object.$B.$is_member (brython.js:5037)
    at WebSocket.ws_on_message9 (eval at run_script (brython.js:4184), <anonymous>:649:32)
_b_.TypeError @ VM98333:121
$B.$is_member @ brython.js:5037
ws_on_message9 @ VM98506:649

I am calling brython with
<body onload="brython(1)">

Also tried
<body onload="brython({debug:1})">
and
<body onload="brython({debug_mode:1})">

Am I missing something basic here? I want to get the python error, like the docs state "as close as possible to the one generated by Python3".

Can someone point out what I am missing here please?

Thanks,
Sam.

kikocorreoso

unread,
Nov 18, 2017, 6:40:50 AM11/18/17
to bry...@googlegroups.com, Samuel Mathieson
Sometimes this is not possible because there is a previous uncaught error.


Can someone point out what I am missing here please?
Could you post the minimal portion of python code that raises the previous error in order to reproduce it?

Thanks,
Sam.

Este correo electrónico y cualquier archivo transmitido adjunto son confidenciales y destinados exclusivamente para el uso de la persona o entidad a quien se dirigen. Si usted ha recibido este mensaje por error por favor notifique al administrador del sistema.
Aviso de PrivacidadLa empresa Mathieson Electrónica en Comunicación S.A. De C.V. con domicilio ubicado en, Geranios #76, Jardines de San Mateo, Naucalpan, Estado de Mexico, C.P. 53240. utilizara sus datos personales recabados con los siguientes fines: Fines laborales. para mayor información sobre el tratamiento de sus datos personales usted puede ingresar a la siguiente página web: http://privacy.mathiesonelco.com/
Mathieson Electronica en Comunicación S.A. de C.V.
--
You received this message because you are subscribed to the Google Groups "brython" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brython+u...@googlegroups.com.
To post to this group, send email to bry...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brython/75ca4994-b754-4cb3-8e41-e68e9dc65147%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Samuel Mathieson

unread,
Nov 18, 2017, 6:54:40 AM11/18/17
to brython
Sorry, can't post relevant code since I really don't know where it is failing as everything *seems* to work.

Full code is here:

I know its in ws_on_message, but that branches out, so don't really have a clue.

Thanks!

Samuel Mathieson

unread,
Nov 18, 2017, 9:53:16 AM11/18/17
to brython
Ok, sorry nevermind... figured it out, It was a function requiring an event, that sometimes did not get it. So just defined as function(ev=None).

Fixed.

Pierre Quentel

unread,
Nov 18, 2017, 9:54:30 AM11/18/17
to brython


Le samedi 18 novembre 2017 12:54:40 UTC+1, Samuel Mathieson a écrit :
Sorry, can't post relevant code since I really don't know where it is failing as everything *seems* to work.

Full code is here:

I know its in ws_on_message, but that branches out, so don't really have a clue.

Thanks!

On Saturday, 18 Nov

We would really like to help, and fix what seems to be a bug in error reporting, but it's almost impossible if we can't reproduce the error.

I tried the code at Pastebin but it fails as soon as the __init__ method of class browserData is called, because there is no file matching config_url.

By reading the stack trace I guess that the error is in line

    if key in data.serials:

Could you print the values of key and data.serials before this line to see their values ?

Samuel Mathieson

unread,
Nov 18, 2017, 9:59:37 AM11/18/17
to brython
Pierre,

Thanks for taking the trouble to look.

Sorry did not think about the config file. Also the server is not public, so it would be difficult to get it to run. Was hoping more that it was something stupid I was missing.

The error (just found it :)) was @ line 234.

The function fullSync was being called without any parameters from within the script. It required an event input since it sometimes gets linked to a button as well.

I fixed it by simply defining fullSync(ev=None).

It was an easy fix, simply difficult to find because the error did not help much :)

Thanks for trying!
Reply all
Reply to author
Forward
0 new messages