#4300 (pyvat.exceptions.ServerError: ServerError: MS_UNAVAILABLE)
by Luc Saffre · in Developers · assigned to Luc Saffre
Résumé
I had this in voga1 when running "inv prep test". I did "go voga1 && pm prep" and it worked without problem. Does the server have a quota per IP address?
Concepts sous-jacents
Commentaires
- 4 ans, 3 mois ago by Luc Saffre about #4300 (pyvat.exceptions.ServerError: ServerError: MS_UNAVAILABLE) : One idea is to have Lino do only a maximum number of online validations (e.g. 5) per prep run.
- 4 ans, 3 mois ago by Luc Saffre about #4300 (pyvat.exceptions.ServerError: ServerError: MS_UNAVAILABLE) : I moved the VAT number validation tests into a separate page topics/vies.rst because it is a complex topic and yet just a minor part of the VAT plugin as a whole.
- 4 ans, 3 mois ago by Luc Saffre about #4300 (pyvat.exceptions.ServerError: ServerError: MS_UNAVAILABLE) : I started by reviewing the [url dev.lino-framework.org/plugins/vat.html developer docs about the vat plugin].
- 4 ans, 3 mois ago by Luc Saffre about #4300 (pyvat.exceptions.ServerError: ServerError: MS_UNAVAILABLE) : Two of the 3 failures in [url gitlab.com/lino-framework/book/-/jobs/2768189922] are probably caused by this. We are doing online VAT id checking only in the pierre demo project now, but that still seems to be too much. The national online VAT servers are not always available, and when one of them is...
- 5 ans, 2 mois ago by Luc Saffre about #4300 (pyvat.exceptions.ServerError: ServerError: MS_UNAVAILABLE) : But let's keep the internal names like vat_id and vat.VatIdChecker because changing these would be more work, and technically seen "id" is better than "number". But when talking about it, even as a developer, it makes sense to use "VAT number".
- 5 ans, 2 mois ago by Luc Saffre about #4300 (pyvat.exceptions.ServerError: ServerError: MS_UNAVAILABLE) : I also realized that [url ec.europa.eu/taxation_customs/vies/ the official EU website] uses the term "VAT number" (not "VAT id", "VAT identification number", VATIN, ...). We should confirm to this and always say :term:`VAT number" in our docs (and the glossary entry for VAT number would explain that...
- 5 ans, 2 mois ago by Luc Saffre about #4300 (pyvat.exceptions.ServerError: ServerError: MS_UNAVAILABLE) : I changed use_online_checks to True also in roger because a lot of tests cases rely on this.
- 5 ans, 2 mois ago by Luc Saffre about #4300 (pyvat.exceptions.ServerError: ServerError: MS_UNAVAILABLE) : The error seems to occur sporadically even when only one demo project uses online check. I added logging to get more information. I now expect pyvat.exceptions.ServerError and change it in another ValidationError... though thet test suite will stil break because the data problem message is different...
- 5 ans, 2 mois ago by Luc Saffre about #4300 (pyvat.exceptions.ServerError: ServerError: MS_UNAVAILABLE) : Ha! I understood what I had broken: the "local" keyword was just misleading. I restored it as a new keyword "online" (i.e. the opposite). Pierre is now the only demo project that does online verification. I added a doctest to show the list of the data resulting problem messages.
- 5 ans, 2 mois ago by Luc Saffre about #4300 (pyvat.exceptions.ServerError: ServerError: MS_UNAVAILABLE) : I added the option and removed the local kwarg in the validator because we want to do the local validation also when remote_check is true. Now it seems that the generated fictive VAT ids had never been checked online. When I activate use_remote_check in ether pierre or apc, the pm prep fails each ti...
- 5 ans, 2 mois ago by Luc Saffre about #4300 (pyvat.exceptions.ServerError: ServerError: MS_UNAVAILABLE) : I am going to do this now, because I'd like the test suite to pass before doing other changes.
- 5 ans, 2 mois ago by Luc Saffre about #4300 (pyvat.exceptions.ServerError: ServerError: MS_UNAVAILABLE) : Now I had a similar error during inv prep: pyvat.exceptions.ServerError: Problem installing fixture '/home/luc/work/lino/lino/modlib/checkdata/fixtures/checkdata.py': ServerError: MS_MAX_CONCURRENT_REQ. So I think that we should add this option use_online_check, and have it set to False by default.
- 5 ans, 2 mois ago by Luc Saffre about #4300 (pyvat.exceptions.ServerError: ServerError: MS_UNAVAILABLE) : Anyway this indicates that we should add a plugin option "use_online_check", which would be False by default and True in one demo project to for test coverage.