I have a user who experienced an error with the app. It was an exception in our code logic that is now fixed. Other users who did not encounter the same problem have continued without trouble. The user who encountered the now fixed error still can not log on with either of two email address he used when he encounter the error. A third email is fine.
I have reset his password and removed the remembered logins. He has tired to log on on several browsers, two computers, cleared cashes and used a browser in private mode. Each time he get this error:
Exception: Data Binding update failed with 1 error. Did you initialise all data binding sources before initialising this component?
“which databinding is not being initialised? I guess if you can answer that then you’re half way there-” -
Exactly !
The only thing missing that is apparent when comparing it to the working user information of the other users is the ‘remembered_login’ column. But I removed that in an attempt to reset the user’s access. I used the drop down menu on the datatable row to to the removal so I think it was done ‘correctly’
If you look at the App Logs for this app, you should be able to find the complete error message – which includes an informative readout of which Data Binding caused the error, and what the actual exception was!
Searching for that error in the App Logs search should be a good start.
New browser session from Slough, United Kingdom.
Exception: Data Binding update failed with 1 error. Did you initialise all data binding sources before initialising this component? at Form1.RowTemplate1, line 15
Exception: Data Binding update failed with 1 error. Did you initialise all data binding sources before initialising this component? at Form1.RowTemplate1, line 15called from Form1, line 28called from Form1, line 23
Exception: Data Binding update failed with 1 error. Did you initialise all data binding sources before initialising this component? at Form1.RowTemplate1, line 15
Exception: Data Binding update failed with 1 error. Did you initialise all data binding sources before initialising this component? at Form1.RowTemplate1, line 15called from Form1, line 28called from Form1, line 23
This is the code in the Form1;
class RowTemplate1(RowTemplate1Template):
def __init__(self, **properties):
# Set Form properties and Data Bindings.
self.init_components(**properties)
# Any code you write here will run when the form opens.
def delete_btn_click(self, **event_args):
"""This method is called when the button is clicked"""
if confirm(f"Delete file {self.item['file'].name}?"):
anvil.server.call('delete_file', self.item)
self.parent.raise_event('x-refresh')
# def chart_btn_click(self, **event_args):
# """This method is called when the button is clicked"""
# open_form('Dashboard01', item={'file':self.item['file'], 'computed_file':self.item['computed_file'], 'analysis_time':self.item['analysis_time']})
def link_1_click(self, **event_args):
"""This method is called when the link is clicked"""
pass
I had thought the def chart_btn_click() might have been causing a problem. I commented that out last night with no apparent effect on the error
Hi @whills – we’ve now expanded the information logged and exposed in App Logs, which should give you a bit more information! Next time one of your users experiences an error like this, you’ll see a lot more information in the App Logs.
@meredydd Thanks very much. The user did attempt to log on again and more information was returned in the logs. The problem persists with both Microsoft and Google logins, but only for that user, other users are able to login with those authentication methods. It is not clear why that particular user should have a problem.
New browser session from Harrow, United Kingdom.
AttributeError: 'NoneType' object has no attribute 'name_$rn$'. Did you
initialise all data binding sources before initialising this component?
at Form1.RowTemplate1, line 15
Error binding text of name_lbl:
'NoneType' object has no attribute 'name_$rn$'
AttributeError: 'NoneType' object has no attribute 'name_$rn$'. Did you
initialise all data binding sources before initialising this component?
at Form1.RowTemplate1, line 15called from Form1, line 28called from
Form1, line 23
Error binding text of name_lbl:
'NoneType' object has no attribute 'name_$rn$'
The user is using two logins and gets the same error with both. They are
a Google and a Microsoft email address. I and several others can login
with Google and Microsoft with no trouble.
The problem might be with the password reset. I just reset the password for another user. I used the ‘Reset Password’ in the drop down menu on the left side of the Users table. The next time the user attempted to get log in they got this error on the screen;
AttributeError: 'NoneType' object has no attribute 'name_$rn$'.
Did you initialise all data binding sources before initialising this component?
This is the same as the other two logins had. I now have three users who can not log in.
my theory:
I think you have an empty cell in one of your datatables that the form is expecting to be a value.
This will be a row with a cell that is associated with a user and is being used in a databinding.
let’s say your name_lbl.text is bound to the name column of some datatable.
You could find this by doing
I’m guessing you don’t have a clone link you can share…
Side note
Skulpt will change certain variable words if they are reserved. name is a reserved word so that’s why it’s saying name_$rn$
You can read the error message without _$rn to get a better understanding of the error.