79517070

Date: 2025-03-18 10:31:42
Score: 1
Natty:
Report link

TLDR: I was looking for the problem in the wrong place, was stuck in a rut, reading nrmzmh’s response unstuck me and I found my stupid mistake.

So I was so focused on the fact that I’m learning Dash and I’m not familiar with it that I was staring at the code to create graphs in Dash and not getting what went wrong. Thanks to nrmzmh I realized that wasn’t the problem.

So in Jupyter I had this:

re.findall("\\n (\w*) Class: (\w*) \\n", text)

And all my testing told me the data was fine, because it was.

But then, as a .py script, it didn’t handle the escape characters well, so I wrote this instead:

re.findall(r"\\n (\w*) Class: (\w*) \\n", text)

So I added the "r" to make it a raw string but forgot to change the double backslashes back to single ones, like so:

re.findall(r"\n (\w*) Class: (\w*) \n", text)

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: AGA