[BUG]ExternalError: SyntaxError: Invalid regular expression: invalid group specifier name

What I’m trying to do:
Some of my users are getting this error and some are not.

What I’ve tried and what’s not working:

Looking at the console log it states the following:

(1)

(2)


^^^ The above is not the issue as it is happening on my devices that DO work. It has to be image (3)

(3)

This just started happening to multiple users and I cannot duplicate on my own device.

Please help :fire:

EDIT

I was able to mitigate the issue by wrapping the re library in a try/except clause.

try:
  import re
except:
  pass

Not sure why this was causing some of my users to experience this error. Could the anvil team take a look, because this takes away from some key capability, dependent on this import, for my users?

1 Like

Wow I was driving myself crazy trying to figure out what went wrong with my code. This is happening to me as well. Also at import re.

1 Like

Yeah I was having a panic attack because my user’s starting flooding my inbox :sweat_smile:

1 Like

Yes we are also seeing this

2 Likes

Thanks for reporting - we’ll get that fixed

If anyone can provide more information on the line of code that is causing the issue that would be helpful
As well as which users are seeing this (i.e. which browsers)

1 Like

It’s the

import re

line

I was noticing it in safari (Mac and IOS).

This happened in multiple apps and even in a copy of a validator I was using from this forum (I’ll update with the link shortly).

Apologies for weird formatting, I’m on my mobile devices.

1 Like

Here is the validator that was failing on the import as well.

It’s tricky because I couldn’t repeat the issue on my Mac or iPhone and I’m not sure the os version of my users.

Yes we suspect it’s browser specific on some older browsers.
We’ve pushed a fix and we’ll do some investigation.
Any other insights into which versions the users were using would be helpful.

2 Likes

I’ll try & see what I can find.

1 Like

Here are a few from our logs.

Browser Info: Mozilla/5.0 (iPhone; CPU iPhone OS 15_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.5 Mobile/15E148 Safari/604.1

Browser Info: Mozilla/5.0 (iPhone; CPU iPhone OS 16_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.3 Mobile/15E148 Safari/604.1

Browser Info: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.3 Safari/605.1.15

Browser Info: Mozilla/5.0 (iPhone; CPU iPhone OS 16_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.2 Mobile/15E148 Safari/604.1

Browser Info: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.3 Safari/605.1.15

Browser Info: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.3 Safari/605.1.15

Browser Info: Mozilla/5.0 (iPhone; CPU iPhone OS 16_1_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.1 Mobile/15E148 Safari/604.1

Browser Info: Mozilla/5.0 (iPhone; CPU iPhone OS 15_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.5 Mobile/15E148 Safari/604.1

2 Likes

Thanks @rickhurlbatt we’ve now found the cause

2 Likes

Could you share this log statement? I would like to yoink it, if you don’t mind.

I think I yoinked it from Stu :stuck_out_tongue_winking_eye:

from anvil.js.window import navigator
print("Browser Info:", navigator.userAgent)

Inserted at the top of the startup form

2 Likes