Running python3-3.7.3 on Slackware-14.2.

I'm trying to debug a module using pdb but failing with all attempts. For
example, using breakpoint() at the line where I want to stop the running
module and examine each line's execution, the program runs to completion and
shows there's a syntax error:

$ python3 geochem.py
  File "geochem.py", line 35
    boxchoices = ttk.Combobox(self, textvariable=med,
             ^
SyntaxError: invalid syntax

Importing pdb and inserting pdb.set_trace() produces the same output.

invoking pdb from the command line produces a full back trace:

$ python3 -m pdb geochem.py Traceback (most recent call last):
  File "/usr/lib/python3.7/pdb.py", line 1701, in main
    pdb._runscript(mainpyfile)
  File "/usr/lib/python3.7/pdb.py", line 1570, in _runscript
    self.run(statement)
  File "/usr/lib/python3.7/bdb.py", line 585, in run
    exec(cmd, globals, locals)
  File "<string>", line 1, in <module>
  File "/home/rshepard/development/openEDMS/views/geochem.py", line 35
    boxchoices = ttk.Combobox(self, textvariable=med,
             ^
SyntaxError: invalid syntax

I don't understand the source of the syntax error and I'm not able to allow
pdb to step through the code.

Your advice appreciated,

Rich




--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to