Skip to content
This repository

memory_profiler.py: error: no such option #27

Closed
amcnabb opened this Issue · 1 comment

2 participants

amcnabb Fabian Pedregosa
amcnabb

When running python -m memory_profiler script_file.py --some-args, memory_profile assumes that --some-args is intended for it rather than for script_file.py. This is easy to fix by adding the following single line immediately after creating the OptionParser:

parser.disable_interspersed_args()
Fabian Pedregosa fabianp referenced this issue from a commit
Fabian Pedregosa Ignore unrecognized args.
Fix by @amcnabb. Fixes issue #27
a8dc01d
Fabian Pedregosa
Owner

Added your fix and worked like a charm. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.