The server responded with the status 500: Internal Server Error

Oops, an error occured! :see_no_evil:

The server responded with the status 500: Internal Server Error

Hola! necesito ayuda. me aparece este error en la seccion de “servicios de analisis”, y no me muestra ni me permite editar nada.
Es la segunda vez que me pasa. creo que es cuando agrego mas de 200 analisis.

Hi! I need help. I get this error in the “analysis services” section, and it doesn’t show me or allow me to edit anything.
This is the second time that happens to me. I think that’s when I add more than 200 analyzes

Cualquier ayuda o comentario es bien recibid0

Hi @serviciosrali19,

What does the log file tell you?

Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Lo sentimos, pero parece que hay un error…

Aquí está el mensaje de error completo:

Mostrar traza como texto

Traceback (innermost last):

  • Module ZPublisher.Publish, line 138, in publish
  • Module ZPublisher.mapply, line 77, in mapply
  • Module ZPublisher.Publish, line 48, in call_object
  • Module senaite.core.listing.view, line 214, in call
  • Module senaite.core.listing.ajax, line 103, in handle_subpath
  • Module senaite.core.listing.decorators, line 63, in wrapper
  • Module senaite.core.listing.decorators, line 50, in wrapper
  • Module senaite.core.listing.decorators, line 100, in wrapper
  • Module senaite.core.listing.ajax, line 528, in ajax_folderitems
  • Module senaite.core.listing.decorators, line 88, in wrapper
  • Module senaite.core.listing.ajax, line 307, in get_folderitems
  • Module bika.lims.controlpanel.bika_analysisservices, line 430, in folderitems
  • Module senaite.core.listing.view, line 895, in folderitems
  • Module bika.lims.controlpanel.bika_analysisservices, line 402, in folderitem
  • Module bika.lims.utils, line 572, in format_supsub

IndexError: pop from empty list

I think that at least one of your analysis services has a “Unit” value starting with a whitespace. This format_supsub function needs to be refactored urgently, though.

Please, open an issue with the full traceback:

https://github.com/senaite/senaite.core/issues/new

Meanwhile, you can fix the issue either by removing the whitespace from the offending service or in code, by replacing this line:

for c in str(text):

from https://github.com/senaite/senaite.core/blob/1.3.x/bika/lims/utils/init.py#L544

by

for c in str(text).strip():
1 Like

Where do i fix this? is a comad for terminal?

I dont think is a whitespace, is when i capture more than 200 anlysis

Im going to roll back from a backup, start over and ill back