question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bug parsing arguments

See original GitHub issue

Hi, In your main function, when you parsing the args - you have to store:

vars(ap.parse_args()

into variable ‘args’ if you subsequently want to use it as a dict. So do this instead:

args = vars(ap.parse_args()

of even better (but be careful, now ‘args’ is not a dict but namespace object):

args = ap.parse_args()

then you can access values in namespace object as follows:

args.input_image1 args.input_image2 args.output_image

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
disarticulatecommented, Apr 3, 2018

I’ve been looking into this.

You cannot use the JPG format for LSB or really any encoding, because the compression is lossy, therefore all bits will disappear when the function tries to resassmble.

See: http://domnit.org/stepic/doc/ https://pypi.python.org/pypi/cryptosteganography/0.2.1 https://github.com/RobinDavid/LSB-Steganography

There’s a possibility of encoding without decompression here: http://www.ifs.schaathun.net/pysteg/

1reaction
scgbckbonecommented, Apr 2, 2018

I double checked and now it works correctly with either python2 or python3.

Lastly, if you have some idea about why this is not working with JPG format, please let me know.

to be honest, I have no idea

Read more comments on GitHub >

github_iconTop Results From Across the Web

Arguments parsing error [duplicate] - Stack Overflow
I am trying to parse the run-arguments within my console application with this code: int _tmain(int argc, _TCHAR* argv[]) { if(argv[1] ...
Read more >
argparse — Parser for command-line options, arguments and ...
The program defines what arguments it requires, and argparse will figure out how to parse those out of sys.argv . The argparse module...
Read more >
Bugs in program argument parsing (compared to command line)
While trying to fix bug 387026, I found a couple of bugs in the program argument parsing code (compared to command line). The...
Read more >
Bug in parsing arguments to <command> - Google Groups
While attempting to use ShadowSpawn with Rsync, I discovered a bug in the parsing of arguments to <command>. Viz., Arguments beginning with '-'...
Read more >
Error parsing the command-line arguments - TeraByte Unlimited
Re: Error parsing the command-line arguments ... "ostapvoip" wrote in message news:15611@public.tbosdt... Hello, A simple TBS script sub main()
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found