I am switching tool-chains, from an eclipse based python ide to a vim based equivalent.
I am currently experimenting with pudb.
I am trying to step through some code google gives as examples for tensorflow. It runs in a venv, on python3.5. None of the debuggers gives a problem on importing venv specific libraries, so I believe they are all operating in the intended venv.
pdb and ipdb both run/step through the code in its entirety without a problem - which is great.
When I try to run pudb I get the following error:
Traceback (most recent call last):
File "~/interpreters/p35/lib/python3.5/site-packages/tensorflow/python/platform/app.py",
line 44, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough)) TypeError: main() takes 0 positional arguments but 1 was given
The main is defined as follows:
def main(argv=None): # pylint: disable=unused-argument
cifar10.maybe_download_and_extract()
if tf.gfile.Exists(FLAGS.train_dir):
tf.gfile.DeleteRecursively(FLAGS.train_dir)
tf.gfile.MakeDirs(FLAGS.train_dir)
train()
if __name__ == '__main__': tf.app.run()
And tf.app.run() looks like this:
def run(main=None, argv=None):
#Runs the program with an optional 'main' function and 'argv' list.
f = flags.FLAGS
# Extract the args from the optional `argv` list.
args = argv[1:] if argv else None
# Parse the known flags from that list, or from the command line otherwise.
# pylint: disable=protected-access
flags_passthrough = f._parse_flags(args=args)
# pylint: enable=protected-access
main = main or _sys.modules['__main__'].main
# Call the main function, passing through any arguments to the final program.
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
I was really hoping to get pudb working on this code as I really like its interface.
I fidgeted with a alot of options here and am running up short. Anyone have any ideas about the variance here in operation between pdb, ipdb and pudb?
Thanks,
nt