HTR-United / HTRVX

HTRVX : HTR Validation with XSD
GNU General Public License v3.0
2 stars 1 forks source link

Syntax Error: invalid syntax #9

Closed elodiepaupe closed 2 years ago

elodiepaupe commented 2 years ago

Hello! I try to use again the HTRVX that I use on my data a few weeks later, but I have a problem of syntax. So I download the zip on github to use the test data and I still have the same problem.

pip install htrvx
Requirement already satisfied: htrvx in /opt/miniconda3/envs/p37/lib/python3.7/site-packages (0.0.8)
Requirement already satisfied: requests in /opt/miniconda3/envs/p37/lib/python3.7/site-packages (from htrvx) (2.26.0)
Requirement already satisfied: click<=9.0 in /opt/miniconda3/envs/p37/lib/python3.7/site-packages (from htrvx) (8.0.3)
Requirement already satisfied: lxml in /opt/miniconda3/envs/p37/lib/python3.7/site-packages (from htrvx) (4.6.3)
Requirement already satisfied: importlib-metadata in /opt/miniconda3/envs/p37/lib/python3.7/site-packages (from click<=9.0->htrvx) (4.11.2)
Requirement already satisfied: zipp>=0.5 in /opt/miniconda3/envs/p37/lib/python3.7/site-packages (from importlib-metadata->click<=9.0->htrvx) (3.6.0)
Requirement already satisfied: typing-extensions>=3.6.4 in /opt/miniconda3/envs/p37/lib/python3.7/site-packages (from importlib-metadata->click<=9.0->htrvx) (3.10.0.2)
Requirement already satisfied: certifi>=2017.4.17 in /opt/miniconda3/envs/p37/lib/python3.7/site-packages (from requests->htrvx) (2020.6.20)
Requirement already satisfied: charset-normalizer~=2.0.0 in /opt/miniconda3/envs/p37/lib/python3.7/site-packages (from requests->htrvx) (2.0.6)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /opt/miniconda3/envs/p37/lib/python3.7/site-packages (from requests->htrvx) (1.26.7)
Requirement already satisfied: idna<4,>=2.5 in /opt/miniconda3/envs/p37/lib/python3.7/site-packages (from requests->htrvx) (3.2)
Note: you may need to restart the kernel to use updated packages.

htrvx ./tests/test_data/page/*.xml --format page
  File "<ipython-input-8-8e6f1c8aa0a6>", line 1
    htrvx ./tests/test_data/page/*.xml --format page
           ^
SyntaxError: invalid syntax

I try to restart the kernel and to use another format for the path, but nothing worked. What am I doing wrong? Thank you for your help!

MacOS: 12.4 Python: 3.9.5

PonteIneptique commented 2 years ago

It seems you are running the command in ipython, I could be wrong though. Try simply activating the environment and then running the command. Do not run ipython or python.

Le sam. 18 juin 2022 à 3:45 PM, elodiepaupe @.***> a écrit :

Hello! I try to use again the HTRVX that I use on my data a few weeks later, but I have a problem of syntax. So I download the zip on github to use the test data and I still have the same problem.

pip install htrvxRequirement already satisfied: htrvx in /opt/miniconda3/envs/p37/lib/python3.7/site-packages (0.0.8)Requirement already satisfied: requests in /opt/miniconda3/envs/p37/lib/python3.7/site-packages (from htrvx) (2.26.0)Requirement already satisfied: click<=9.0 in /opt/miniconda3/envs/p37/lib/python3.7/site-packages (from htrvx) (8.0.3)Requirement already satisfied: lxml in /opt/miniconda3/envs/p37/lib/python3.7/site-packages (from htrvx) (4.6.3)Requirement already satisfied: importlib-metadata in /opt/miniconda3/envs/p37/lib/python3.7/site-packages (from click<=9.0->htrvx) (4.11.2)Requirement already satisfied: zipp>=0.5 in /opt/miniconda3/envs/p37/lib/python3.7/site-packages (from importlib-metadata->click<=9.0->htrvx) (3.6.0)Requirement already satisfied: typing-extensions>=3.6.4 in /opt/miniconda3/envs/p37/lib/python3.7/site-packages (from importlib-metadata->click<=9.0->htrvx) (3.10.0.2)Requirement already satisfied: certifi>=2017.4.17 in /opt/miniconda3/envs/p37/lib/python3.7/site-packages (from requests->htrvx) (2020.6.20)Requirement already satisfied: charset-normalizer~=2.0.0 in /opt/miniconda3/envs/p37/lib/python3.7/site-packages (from requests->htrvx) (2.0.6)Requirement already satisfied: urllib3<1.27,>=1.21.1 in /opt/miniconda3/envs/p37/lib/python3.7/site-packages (from requests->htrvx) (1.26.7)Requirement already satisfied: idna<4,>=2.5 in /opt/miniconda3/envs/p37/lib/python3.7/site-packages (from requests->htrvx) (3.2)Note: you may need to restart the kernel to use updated packages. htrvx ./tests/test_data/page/.xml --format page File "", line 1 htrvx ./tests/test_data/page/.xml --format page ^SyntaxError: invalid syntax

I try to restart the kernel and to use another format for the path, but nothing worked. What am I doing wrong? Thank you for your help!

MacOS: 12.4 Python: 3.9.5

— Reply to this email directly, view it on GitHub https://github.com/HTR-United/HTRVX/issues/9, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOXEZXSLJOF36NOGWOK3OLVPXHGRANCNFSM5ZEZDPPQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

elodiepaupe commented 2 years ago

Hum... Thank you and sorry for the silly question!

PonteIneptique commented 2 years ago

Do not worries, all questions are welcome. Just a thing: HTRVX tests nothing if you don't ask it to. You should probably at least run --check-empty, usually, we have --xsd --group --check-empty --verbose and --segmonto on top of it if you use segmonto :)

elodiepaupe commented 2 years ago

I should use --segmonto (Simon, if you read this), but for now... Again, thank's!