using trace module in enthought
Sharan Basappa
sharan.basappa at gmail.com
Sat Jun 30 12:46:32 EDT 2018
I am using enthought for python. Trace module seems to be very useful for my work but somehow I am unable to make it work.
When I use the following option, I get the following error:
%run -m trace --trace "D:/Projects/Initiatives/machine learning/programs/debug_1.py"
UsageError: option --trace not recognized ( allowed: "nidtN:b:pD:l:rs:T:em:G" )
%run -m trace --trace "D:/Projects/Initiatives/machine learning/programs/debug_1.py" --trace
UsageError: option --trace not recognized ( allowed: "nidtN:b:pD:l:rs:T:em:G" )
%run -m trace "D:/Projects/Initiatives/machine learning/programs/debug_1.py" --trace
D:\Users\sharanb\AppData\Local\Enthought\Canopy\edm\envs\User\lib\trace.py: must specify one of --trace, --count, --report, --listfuncs, or --trackcalls
SystemExitTraceback (most recent call last)
D:\Users\sharanb\AppData\Local\Enthought\Canopy\edm\envs\User\lib\runpy.pyc in run_module(mod_name, init_globals, run_name, alter_sys)
186 if alter_sys:
187 return _run_module_code(code, init_globals, run_name,
--> 188 fname, loader, pkg_name)
189 else:
190 # Leave the sys module alone
D:\Users\sharanb\AppData\Local\Enthought\Canopy\edm\envs\User\lib\runpy.pyc in _run_module_code(code, init_globals, mod_name, mod_fname, mod_loader, pkg_name)
80 mod_globals = temp_module.module.__dict__
81 _run_code(code, mod_globals, init_globals,
---> 82 mod_name, mod_fname, mod_loader, pkg_name)
83 # Copy the globals of the temporary module, as they
84 # may be cleared when the temporary module goes away
D:\Users\sharanb\AppData\Local\Enthought\Canopy\edm\envs\User\lib\runpy.pyc in _run_code(code, run_globals, init_globals, mod_name, mod_fname, mod_loader, pkg_name)
70 __loader__ = mod_loader,
71 __package__ = pkg_name)
---> 72 exec code in run_globals
73 return run_globals
74
D:\Users\sharanb\AppData\Local\Enthought\Canopy\edm\envs\User\lib\trace.py in <module>()
817
818 if __name__=='__main__':
--> 819 main()
D:\Users\sharanb\AppData\Local\Enthought\Canopy\edm\envs\User\lib\trace.py in main(argv)
770
771 if not (count or trace or report or listfuncs or countcallers):
--> 772 _err_exit("must specify one of --trace, --count, --report, "
773 "--listfuncs, or --trackcalls")
774
D:\Users\sharanb\AppData\Local\Enthought\Canopy\edm\envs\User\lib\trace.py in _err_exit(msg)
655 def _err_exit(msg):
656 sys.stderr.write("%s: %s\n" % (sys.argv[0], msg))
--> 657 sys.exit(1)
658
659 def main(argv=None):
SystemExit: 1
I don't know where I am going wrong.
More information about the Python-list
mailing list