Re: Debugging technique

2020-10-03 Thread Irv Kalb
This probably is not for you. But PyCharm has a panel that shows a stack trace. I created a video about debugging using the PyCharm debugger. Here is a YouTube link: https://www.youtube.com/watch?v=cxAOSQQwDJ4 Irv > On Oct 2, 2020, at 11:51 PM,

Re: ValueError: arrays must all be same length

2020-10-03 Thread Peter Pearson
On Fri, 2 Oct 2020 13:34:46 +0100, Shaozhong SHI wrote: > Hello, > > I got a json response from an API and tried to use pandas to put data into > a dataframe. > > However, I kept getting this ValueError: arrays must all be same length. > > Can anyone help? > > The following is the json text. Rega

Re: Python 3.8.5 Not Launching

2020-10-03 Thread Eryk Sun
On 10/3/20, Gertjan Klein wrote: > > I tried to find out what happens, using your other code: > > >>> import win32con, win32api > >>> access = win32con.PROCESS_QUERY_LIMITED_INFORMATION > >>> hproc = win32api.OpenProcess(access, False, pid) > >>> executable = win32process.GetModuleFileNameEx(h

Re: Python 3.8.5 Not Launching

2020-10-03 Thread Gertjan Klein
Chris Angelico schreef: On Fri, Oct 2, 2020 at 7:51 PM Gertjan Klein wrote: Is it possible to determine, from within Python, whether Python allocated or inherited the console? This could be useful to know in a (global) error trap: to be able to see a traceback, the console must remain open, wh

Re: Python 3.8.5 Not Launching

2020-10-03 Thread Gertjan Klein
Eryk Sun schreef: On 10/2/20, Gertjan Klein wrote: Is it possible to determine, from within Python, whether Python allocated or inherited the console? If a console session isn't headless (i.e. it's not a pseudoconsole) and has a window (i.e. not allocated with CREATE_NO_WINDOW), then the effe

Re: Debugging technique

2020-10-03 Thread Frank Millman
On 2020-10-03 8:58 AM, Chris Angelico wrote: On Sat, Oct 3, 2020 at 4:53 PM Frank Millman wrote: Hi all When debugging, I sometimes add a 'breakpoint()' to my code to examine various objects. However, I often want to know how I got there, so I replace the 'breakpoint()' with a '1/0', to forc

Re: Debugging technique

2020-10-03 Thread Chris Angelico
On Sat, Oct 3, 2020 at 4:53 PM Frank Millman wrote: > > Hi all > > When debugging, I sometimes add a 'breakpoint()' to my code to examine > various objects. > > However, I often want to know how I got there, so I replace the > 'breakpoint()' with a '1/0', to force a traceback at that point. Then I