502 BAD GATEWAY al intentar visualizar facturas en HTML #49

Closed
opened 2022-01-28 12:09:05 -06:00 by luisgp · 8 comments

Esto me sigue pasando con las actualizaciones =>1.45

Originally posted by @luisgp in #29 (comment)

Esto me sigue pasando con las actualizaciones =>1.45 _Originally posted by @luisgp in https://git.cuates.net/elmau/empresa-libre/issues/29#issuecomment-430_
Owner

Estamos en 1.46.0 y no puedo reproducir el error...

Estamos en 1.46.0 y no puedo reproducir el error...
Owner

siempre miren el log...

siempre miren el log...
Author

Por lo que estoy viendo, este error se genera pero solo en las facturas que tienen retención de ISR, en mi caso como soy RESICO a las personas morales. No probé otros casos porque no tengo.

Traceback (most recent call last):
  File "/home/empresa/.local/lib/python3.8/site-packages/beaker/middleware.py", line 156, in __call__
    return self.wrap_app(environ, session_start_response)
  File "/home/empresa/.local/lib/python3.8/site-packages/falcon/api.py", line 244, in __call__
    responder(req, resp, **params)
  File "/opt/clients/xxxx760830xxx/source/app/./controllers/main.py", line 547, in on_get
    self._db.get_doc(type_doc, id_doc, session['rfc'])
  File "/opt/clients/xxxx760830xxx/source/app/./models/db.py", line 423, in get_doc
    return main.get_doc(type_doc, id, rfc)
  File "/opt/clients/xxxx760830xxx/source/app/./models/main.py", line 276, in get_doc
    data, file_name = Facturas.get_html(id)
  File "/opt/clients/xxxx760830xxx/source/app/./models/main.py", line 4790, in get_html
    data = cls._get_others_values(cls, obj, emisor)
  File "/opt/clients/xxxx760830xxx/source/app/./models/main.py", line 4743, in _get_others_values
    self._get_tax(self, subnode, data, currency)
  File "/opt/clients/xxxx760830xxx/source/app/./models/main.py", line 4688, in _get_tax
    tasa = f"{float(d['tasaocuota']):.2f}"
  File "/opt/clients/xxxx760830xxx/source/app/./controllers/helper.py", line 73, in __getitem__
    return self._store[key.lower()][1]
KeyError: 'tasaocuota'
[pid: 640|app: 0|req: 68/136] X.X.X.X () {54 vars in 921 bytes} [Sat Jan 29 09:42:43 2022] GET /doc/html/3713 => generated 0 bytes in 32 msecs (HTTP/2.0 500) 0 headers in 0 bytes (0 switches on core 1)

Por lo que estoy viendo, este error se genera pero solo en las facturas que tienen retención de ISR, en mi caso como soy RESICO a las personas morales. No probé otros casos porque no tengo. ``` Traceback (most recent call last): File "/home/empresa/.local/lib/python3.8/site-packages/beaker/middleware.py", line 156, in __call__ return self.wrap_app(environ, session_start_response) File "/home/empresa/.local/lib/python3.8/site-packages/falcon/api.py", line 244, in __call__ responder(req, resp, **params) File "/opt/clients/xxxx760830xxx/source/app/./controllers/main.py", line 547, in on_get self._db.get_doc(type_doc, id_doc, session['rfc']) File "/opt/clients/xxxx760830xxx/source/app/./models/db.py", line 423, in get_doc return main.get_doc(type_doc, id, rfc) File "/opt/clients/xxxx760830xxx/source/app/./models/main.py", line 276, in get_doc data, file_name = Facturas.get_html(id) File "/opt/clients/xxxx760830xxx/source/app/./models/main.py", line 4790, in get_html data = cls._get_others_values(cls, obj, emisor) File "/opt/clients/xxxx760830xxx/source/app/./models/main.py", line 4743, in _get_others_values self._get_tax(self, subnode, data, currency) File "/opt/clients/xxxx760830xxx/source/app/./models/main.py", line 4688, in _get_tax tasa = f"{float(d['tasaocuota']):.2f}" File "/opt/clients/xxxx760830xxx/source/app/./controllers/helper.py", line 73, in __getitem__ return self._store[key.lower()][1] KeyError: 'tasaocuota' [pid: 640|app: 0|req: 68/136] X.X.X.X () {54 vars in 921 bytes} [Sat Jan 29 09:42:43 2022] GET /doc/html/3713 => generated 0 bytes in 32 msecs (HTTP/2.0 500) 0 headers in 0 bytes (0 switches on core 1) ```
Owner

Necesito más ayuda, estoy con mucho trabajo migrando a CFDI4...

https://demo.empresalibre.mx/

Cualquier error debe ser reproducible en nuestro demo, y debe ser lo suficientemente detallado, para no hacerles más preguntas y arreglarlo.

Necesito más ayuda, estoy con mucho trabajo migrando a CFDI4... https://demo.empresalibre.mx/ Cualquier error debe ser reproducible en nuestro demo, y debe ser lo suficientemente detallado, para no hacerles más preguntas y arreglarlo.
elmau referenced this issue from a commit 2022-01-29 20:47:40 -06:00
Owner

Validalo en el demo por favor...

Validalo en el demo por favor...
Author

Perdón, estoy seguro de que lo había visto en algún correo, blog, wiki o algo pero no encuentro ya los datos para usar la demo.

Perdón, estoy seguro de que lo había visto en algún correo, blog, wiki o algo pero no encuentro ya los datos para usar la demo.
Owner

bueno, ya esta en master... pruebalo en tu instalación...

bueno, ya esta en `master`... pruebalo en tu instalación...
Author

Confirmado que ya funciona... gracias.

Confirmado que ya funciona... gracias.
Sign in to join this conversation.
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: elmau/empresa-libre#49
No description provided.