ExternalError: TypeError: Cannot read property 'lineno' of null

I cannot load a specific local module from my form code - it raises ExternalError: TypeError: Cannot read property 'lineno' of null - but the code does not have any linting errors in either Anvil or my local editor, and lineno is not used anywhere in the code. At a guess this is an unhandled exception, but without better information I can’t debug it - and the mangling of the exception seems like a bug. TIA for any responses

Hi @argonaut.industries - welcome to the forum!

Can you provide a clone link that demonstrates this behaviour, so we can investigate?

https://anvil.works/build#clone:OXAWBCQAU6TIN5TL=L2ZV3RA7S3T4CFTPUV4KMVHF
Done. Removing this class (possibly annotation-related) stops the error (determined by butchering the original code until only that class was left)

I believe that such variable annotations as you’ve used below are not supported. Also this shadows a built-in function but the error is not related to that.

class Price:
   max: int 
1 Like

That actually doesn’t shadow the built-in function - but I had figured that it might be annotation-related

Cool. Glad you figured it out.

In my case the error was caused due to a component (Image within a link label.) When these components were removed, the whole application started working normally. So check each component and verify whether they have appropriate values assigned.

1 Like