You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hi
The below code is run ok, but in debugging it, a problem is appeared and below text is appeared in popup windows: Traceback (most recent call last):
File "C:\Program Files (x86)\Thonny\lib\site-packages\thonny\workbench.py", line 1788, in event_generate
handler(event)
File "C:\Program Files (x86)\Thonny\lib\site-packages\thonny\plugins\debugger.py", line 1217, in _handle_debugger_progress
_current_debugger.handle_debugger_progress(msg)
File "C:\Program Files (x86)\Thonny\lib\site-packages\thonny\plugins\debugger.py", line 278, in handle_debugger_progress
self._main_frame_visualizer.update_this_and_next_frames(msg)
File "C:\Program Files (x86)\Thonny\lib\site-packages\thonny\plugins\debugger.py", line 425, in update_this_and_next_frames
self._next_frame_visualizer.update_this_and_next_frames(msg)
File "C:\Program Files (x86)\Thonny\lib\site-packages\thonny\plugins\debugger.py", line 411, in update_this_and_next_frames
self._update_this_frame(msg, frame_info)
File "C:\Program Files (x86)\Thonny\lib\site-packages\thonny\plugins\debugger.py", line 1018, in _update_this_frame
DialogVisualizer._update_this_frame(self, msg, frame_info)
File "C:\Program Files (x86)\Thonny\lib\site-packages\thonny\plugins\debugger.py", line 972, in _update_this_frame
FrameVisualizer._update_this_frame(self, msg, frame_info)
File "C:\Program Files (x86)\Thonny\lib\site-packages\thonny\plugins\debugger.py", line 470, in _update_this_frame
self._expression_box.update_expression(msg, frame_info)
File "C:\Program Files (x86)\Thonny\lib\site-packages\thonny\plugins\debugger.py", line 669, in update_expression
self._highlight_range(
File "C:\Program Files (x86)\Thonny\lib\site-packages\thonny\plugins\debugger.py", line 802, in highlight_range
self.text.tag_add(tag, start_index, end_index)
File "C:\Program Files (x86)\Thonny\lib\tkinter_init.py", line 3869, in tag_add
self.tk.call(
_tkinter.TclError: bad text index "11_12"
code:
#random_password.py
# from:https://treyhunner.com/2018/04/keyword-arguments-in-python/
from random import choice, shuffle
UPPERCASE = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
LOWERCASE = UPPERCASE.lower()
DIGITS = "0123456789"
ALL = UPPERCASE + LOWERCASE + DIGITS
def random_password(*, upper, lower, digits, length):
chars = [
*(choice(UPPERCASE) for _ in range(upper)),
*(choice(LOWERCASE) for _ in range(lower)),
*(choice(DIGITS) for _ in range(digits)),
*(choice(ALL) for _ in range(length-upper-lower-digits)),
]
shuffle(chars)
return "".join(chars)
print(random_password(upper=1, lower=1, digits=1, length=8)) # out: such as 'oNA7rYWI'
print(random_password(upper=1, lower=1, digits=1, length=8)) # out: such as 'bjonpuM6'
# but random_password(1,1,1,8) CAUSES ERROR: TypeError: random_password() takes 0 positional arguments but 4 were given
again i must said code is run okey, but in debuggin,problem is appeared in line: chars=[...] inside function.
thanks
The text was updated successfully, but these errors were encountered:
hi
The below code is run ok, but in debugging it, a problem is appeared and below text is appeared in popup windows:
Traceback (most recent call last):
File "C:\Program Files (x86)\Thonny\lib\site-packages\thonny\workbench.py", line 1788, in event_generate
handler(event)
File "C:\Program Files (x86)\Thonny\lib\site-packages\thonny\plugins\debugger.py", line 1217, in _handle_debugger_progress
_current_debugger.handle_debugger_progress(msg)
File "C:\Program Files (x86)\Thonny\lib\site-packages\thonny\plugins\debugger.py", line 278, in handle_debugger_progress
self._main_frame_visualizer.update_this_and_next_frames(msg)
File "C:\Program Files (x86)\Thonny\lib\site-packages\thonny\plugins\debugger.py", line 425, in update_this_and_next_frames
self._next_frame_visualizer.update_this_and_next_frames(msg)
File "C:\Program Files (x86)\Thonny\lib\site-packages\thonny\plugins\debugger.py", line 411, in update_this_and_next_frames
self._update_this_frame(msg, frame_info)
File "C:\Program Files (x86)\Thonny\lib\site-packages\thonny\plugins\debugger.py", line 1018, in _update_this_frame
DialogVisualizer._update_this_frame(self, msg, frame_info)
File "C:\Program Files (x86)\Thonny\lib\site-packages\thonny\plugins\debugger.py", line 972, in _update_this_frame
FrameVisualizer._update_this_frame(self, msg, frame_info)
File "C:\Program Files (x86)\Thonny\lib\site-packages\thonny\plugins\debugger.py", line 470, in _update_this_frame
self._expression_box.update_expression(msg, frame_info)
File "C:\Program Files (x86)\Thonny\lib\site-packages\thonny\plugins\debugger.py", line 669, in update_expression
self._highlight_range(
File "C:\Program Files (x86)\Thonny\lib\site-packages\thonny\plugins\debugger.py", line 802, in highlight_range
self.text.tag_add(tag, start_index, end_index)
File "C:\Program Files (x86)\Thonny\lib\tkinter_init.py", line 3869, in tag_add
self.tk.call(
_tkinter.TclError: bad text index "11_12"
code:
again i must said code is run okey, but in debuggin,problem is appeared in line: chars=[...] inside function.
thanks
The text was updated successfully, but these errors were encountered: