[Tutor] Argparse Error

Nathan Johnson nathanj9715 at gmail.com
Sat Aug 11 19:51:21 EDT 2018


x64 Based PC
Windows 10 Home
Version 1803
OS Build 17134.191

Python 3.7.0 x32

Hello I am trying to glitch video files for artistic purposes by using a
scrip I found on Reddit (linked below). This is the first time I have tried
to use Python and I need some help with an error that I keep getting after
I input this first part of the script

import argparse

parser = argparse.ArgumentParser(description="Shift bytes in a file")
parser.add_argument("file", help="input file")
parser.add_argument("-o", "--output", help="output file")
parser.add_argument("-i", "--interval", help="byte interval", default=1000)
parser.add_argument("-s", "--shift", help="size of shift", default=4)
parser.add_argument("-k", "--skip", help="size of initial skip offset",
default=128)
args = parser.parse_args()

the error says

: error: the following arguments are required: file

I am trying to follow a post on Reddit
https://www.reddit.com/r/glitch_art/comments/5o7irq/i_compiled_a_compendium_of_corruption_effects_on/

with the script that was provided in the comments
https://github.com/v0x76/GlitchTools/blob/master/bytsh.py

Any help would be appreciated greatly and thank you for your time.


More information about the Tutor mailing list