juangallostra / augmented-reality

Augmented reality proof of concept project with Python and OpenCV
MIT License
335 stars 118 forks source link

error: unrecognized arguments: #8

Closed ahmadxon closed 5 years ago

ahmadxon commented 5 years ago

I am getting this error any idea, please?

usage: ipykernel_launcher.py [-h] [-r] [-mk] [-fk] [-ma] ipykernel_launcher.py: error: unrecognized arguments: C:\Users\Wooks\AppData\Roaming\jupyter\runtime\kernel-6769bc09-1f3c-4e3a-89c1-35e83a077bea.json An exception has occurred, use %tb to see the full traceback.

SystemExit: 2

C:\ProgramData\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py:2971: UserWarning: To exit: use 'exit', 'quit', or Ctrl-D. warn("To exit: use 'exit', 'quit', or Ctrl-D.", stacklevel=1)

juangallostra commented 5 years ago

@ahmadxon my guess is that there is a conflict between the provided code and jupyter due to the usage of argparse.

See: https://stackoverflow.com/questions/48796169/how-to-fix-ipykernel-launcher-py-error-unrecognized-arguments-in-jupyter

The easiest solution would be to remove the lines related to argparse (10, 162-167) and hardcode its values in the rest of the code. Yo can find where to hardcode this values by searching args in the code.

As an example, in https://github.com/juangallostra/augmented-reality/blob/19a49c47982df9009c7f6ec06a0eb3613050562b/src/ar_main.py#L65

args.rectangle should be replaced by a hardcoded value of either True or False. This should be done with all the references to args.

juangallostra commented 5 years ago

Closing due to inactivity.