ERROR: Error reading server cases: Unexpected null value (line 1 column 135146)

Discussions about syncing data via Bluetooth, Dropbox, FTP, and using CSWeb
Post Reply
nlxlee
Posts: 11
Joined: May 8th, 2021, 11:51 pm

ERROR: Error reading server cases: Unexpected null value (line 1 column 135146)

Post by nlxlee »

Hello. I noticed when syncing data the program gets to crash at some point and does not complete syncing. I hence went to check the sync.log file to see what happened. below is part of the log file I got:
2022-10-28 16:50:22,256 INFO: First time GET with this server
2022-10-28 16:50:22,256 INFO: Start case download with chunk size of 100
2022-10-28 16:50:23,087 INFO: Status : 206
2022-10-28 16:50:23,087 INFO: Server case count = 100/107
2022-10-28 16:50:25,008 ERROR: Error reading server cases: Unexpected null value (line 1 column 135146)
2022-10-28 16:50:25,008 INFO: Start case download with chunk size of 100
2022-10-28 16:50:25,008 INFO: Download chunk starting from case ...

What could be the meaning of the error and how can I resolve it?
sherrell
Posts: 406
Joined: April 2nd, 2014, 9:16 pm
Location: Washington, DC

Re: ERROR: Error reading server cases: Unexpected null value (line 1 column 135146)

Post by sherrell »

I am not the CSWeb expert, but from a response given to a similar post on the listserv, let me suggest this:

This is most likely due to a case that has been set to partial but without the partial_save_field_name being set. You can run a query in MySQL on the data and check which cases have an issue:

SELECT * FROM `<your dictionary name>` WHERE `partial_save_mode` = 'add' AND `partial_save_field_name` is NULL

Were the cases modified manually on the MySQL database? (which they shouldn't be).

Hope this helps.
Sherrell
nlxlee
Posts: 11
Joined: May 8th, 2021, 11:51 pm

Re: ERROR: Error reading server cases: Unexpected null value (line 1 column 135146)

Post by nlxlee »

Hello Sherrel,
Thanks for the feedback. Unfortunately, the query gives zero results. I tried running the conditions separately and found that there is no result with partial_save_mode = 'add'. There is however a number of cases where partial_save_field_name is NULL. No, I did not modify them in MySQL.
sherrell
Posts: 406
Joined: April 2nd, 2014, 9:16 pm
Location: Washington, DC

Re: ERROR: Error reading server cases: Unexpected null value (line 1 column 135146)

Post by sherrell »

>There is however a number of cases where partial_save_field_name is NULL.

So, again, I'm not the expert, but interpreting what was said in a listserv response, having any field with a partial_save_field_name set to NULL is bad (those cases likely have partial_save_mode set to 'modify'). You have two options to clear the partial save status:

[1] UPDATE `<dictionary name>` SET `partial_save_mode`= NULL WHERE `partial_save_mode` = 'modify' AND `partial_save_field_name` is NULL

[2] OR set some valid partial field using a dictionary item that is on the form

UPDATE `<dictionary name>` SET `partial_save_field_name`= '<FIELD_NAME>', `partial_save_record_occurrence` = 1, `partial_save_item_occurrence`=1 WHERE `partial_save_mode` = 'modify' AND `partial_save_field_name` is NULL

See if that helps.

Sherrell
Post Reply