Debugger

32 views
Skip to first unread message

Константин Комков

unread,
Oct 22, 2019, 4:56:12 AM10/22/19
to web2py-users
I want add brakpoint in my app. After that I click on breakpoins button I have error:

Error ticket for "admin"

Ticket ID

127.0.0.1.2019-10-22.11-52-19.9c598e8d-223c-4134-a4a0-27852a9c40f8

<class 'UnicodeDecodeError'> 'charmap' codec can't decode byte 0x98 in position 6123: character maps to <undefined>

Версия

web2py™Version 2.18.5-stable+timestamp.2019.04.08.04.22.03
PythonPython 3.7.3: C:\Python\python.exe (prefix: C:\Python)

Traceback

1.
2.
3.
4.
5.
6.
7.
8.
9.
Traceback (most recent call last):
File "C:\Users\kkomkov.TIMACAD\Desktop\web2py\gluon\restricted.py", line 219, in restricted
exec(ccode, environment)
File "C:\Users\kkomkov.TIMACAD\Desktop\web2py\applications\admin\views\debug/breakpoints.html", line 130, in <module>
})
;
File "C:\Python\lib\encodings\cp1251.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x98 in position 6123: character maps to <undefined>

Error snapshot help

UnicodeDecodeError('charmap' codec can't decode byte 0x98 in position 6123: character maps to <undefined>)

inspect attributes

Frames

  • File C:\Users\kkomkov.TIMACAD\Desktop\web2py\gluon\restricted.py in restricted at line 219 код аргументы переменные

  • File C:\Users\kkomkov.TIMACAD\Desktop\web2py\applications\admin\views\debug\breakpoints.html in <module> at line 130 код аргументы переменные

  • File C:\Python\lib\encodings\cp1251.py in decode at line 23 код аргументы переменные

    Function argument list

    (self=<encodings.cp1251.IncrementalDecoder object>, input=b'# -*- coding: utf-8 -*-\r\n# -----------------...r\n return response.download(request, db)\r\n', final=True)

    Code listing
    18.
    19.
    20.
    21.
    22.
    23.
    24.
    25.
    26.
    27.
        def encode(self, input, final=False):
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]

    class IncrementalDecoder(codecs.IncrementalDecoder):
    def decode(self, input, final=False):
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]

    class StreamWriter(Codec,codecs.StreamWriter):
    pass
    Variables
    global codecs<module 'codecs' from 'C:\\Python\\lib\\codecs.py'>
    codecs.charmap_decode<built-in function charmap_decode>
    inputb'# -*- coding: utf-8 -*-\r\n# -----------------...r\n return response.download(request, db)\r\n'
    self<encodings.cp1251.IncrementalDecoder object>
    self.errors'strict'
    global decoding_table'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f !"#$%&\'()*+,-./...ПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя'
1.png

Константин Комков

unread,
Oct 22, 2019, 5:08:33 AM10/22/19
to web2py-users
If somebody use debagger, please told how I can create breakpoin and after that see variables. In start of my default.py I wrote from gluon.debug import dbg and I have that code:
    if form.process().accepted:
       
if form.vars.TEACHERS_ID == '':
            db
.tt_on_day.insert(TIMETABLE_ID=tt_id, DATE=form.vars.DATE, DISC_ID=form.vars.DISC_ID, PERSON_ID=form.vars.PERSON_ID, CLASS_ROOM_ID=form.vars.CLASS_ROOM_ID, DOUBLE_CLASS=form.vars.DOUBLE_CLASS)
       
else:
           
if form.vars.END_DATE == '':
               
if form.vars.DATE != '':
                    inWLP
= False
                   
print(arrGraphOnModule)
                   
dbg.set_trace()
How can I understant what now in variable arrGraphOnModule?
Reply all
Reply to author
Forward
0 new messages