title: "ipykernel_launcher.py: error: unrecognized arguments" error running `args = parser.parse_args()`
body: <p>I'm trying to reproduce <a href="https://awesomeopensource.com/project/VinAIResearch/BERTweet?categoryPage=6#usage2" rel="nofollow noreferrer">this BERTweet code</a>.</p>
  <p>I've run the following code in a Google Colab notebook:</p>
  <pre><code>!pip install fairseq
  import fairseq
  !pip install fastBPE
  import fastBPE
  
  # download the pre-trained BERTweet model zipped file
  !wget https://public.vinai.io/BERTweet_base_fairseq.tar.gz
  
  # unzip the pre-trained BERTweet model files
  !tar -xzvf BERTweet_base_fairseq.tar.gz
  
  !pip install transformers
  import transformers
  
  !wget https://public.vinai.io/BERTweet_base_transformers.tar.gz
  !tar -xzvf BERTweet_base_transformers.tar.gz
  
  import torch
  import argparse
  from transformers import RobertaConfig
  from transformers import RobertaModel
  from fairseq.data.encoders.fastbpe import fastBPE
  from fairseq.data import Dictionary
  
  # Load model
  config = RobertaConfig.from_pretrained(
      &quot;/content/BERTweet_base_transformers/config.json&quot;
  )
  BERTweet = RobertaModel.from_pretrained(
      &quot;/content/BERTweet_base_transformers/model.bin&quot;,
      config=config
  )
  
  parser = argparse.ArgumentParser()
  
  parser.add_argument('--bpe-codes', 
      default=&quot;/content/BERTweet_base_transformers/bpe.codes&quot;,
      required=False,
      type=str,  
      help='path to fastBPE BPE'
  )
  
  </code></pre>
  <p>...and this runs successfully.</p>
  <p>I then tried to run:</p>
  <pre><code>args = parser.parse_args()
  </code></pre>
  <p>...which resulted in the following error:</p>
  <pre><code>usage: ipykernel_launcher.py [-h] [--bpe-codes BPE_CODES]
  ipykernel_launcher.py: error: unrecognized arguments: -f /root/.local/share/jupyter/runtime/kernel-96d3f587-5881-4520-9402-8ca07a3fdc75.json
  An exception has occurred, use %tb to see the full traceback.
  
  SystemExit: 2
  </code></pre>
  <p>Here is what my file repository looks like in case this is useful info for debugging:</p>
  <p><a href="https://i.stack.imgur.com/fBtT8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fBtT8.png" alt="enter image description here" /></a></p>
  <p>Why is the error being thrown and what do I need to change (and to what) to fix it?</p>