Gramps Web & Gramps 6.0: Beta Testers Wanted

The new version has been published and is available thru the Addon Manager.

3 Likes

After upgrading Web Sync to version 1.3.1 I now get the following error:

399685: ERROR: grampsapp.py: line 188: Unhandled exception
Traceback (most recent call last):
  File "/Users/sam/Library/Application Support/gramps/gramps60/plugins/GrampsWebSync/grampswebsync.py", line 590, in _async_commit_actions_to_remote
    self.handle_server_errors(
    ~~~~~~~~~~~~~~~~~~~~~~~~~^
        self.api.commit,
        ^^^^^^^^^^^^^^^^
    ...<2 lines>...
        self.sync_progress_page.update_api_progress,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/Users/sam/Library/Application Support/gramps/gramps60/plugins/GrampsWebSync/grampswebsync.py", line 486, in handle_server_errors
    return callback(*args)
  File "/Users/sam/Library/Application Support/gramps/gramps60/plugins/GrampsWebSync/webapihandler.py", line 216, in commit
    data = json.dumps(payload).encode()
           ~~~~~~~~~~^^^^^^^^^
  File "/Applications/Gramps.app/Contents/Resources/lib/python3.13/json/__init__.py", line 231, in dumps
    return _default_encoder.encode(obj)
           ~~~~~~~~~~~~~~~~~~~~~~~^^^^^
  File "/Applications/Gramps.app/Contents/Resources/lib/python3.13/json/encoder.py", line 200, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/Applications/Gramps.app/Contents/Resources/lib/python3.13/json/encoder.py", line 261, in iterencode
    return _iterencode(o, 0)
  File "/Applications/Gramps.app/Contents/Resources/lib/python3.13/json/encoder.py", line 180, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
                    f'is not JSON serializable')
TypeError: Object of type Date is not JSON serializable
1 Like

ok so i’ve done some more de tests :

  • align locales (gramps desktop i, english, as well as gramps web) => same error
  • updated le pluggin via le addon manager (thanx @GaryGriffin for the update) => same error as @csam :slight_smile:

Thanks! I’ll fix it in 12 hours or so :slightly_smiling_face:

1 Like

Status: sync worked for me without any changes to apply to remote (only to local). Now, will look into what happens when I change something locally.

Turns out to be a rather involved problem. Just pushed a fix to Web API, will have to continue working on the fix to the Sync Addon when the new image is built. Likely tomorrow.

1 Like

thanks for your work @DavidMStraub

1 Like

With this fix Small fix to web sync addon for 6.0 by DavidMStraub · Pull Request #721 · gramps-project/addons-source · GitHub sync works for me, but I realized another issue with the handling of type strings in Web API. We’re close to the finish line though…

All went fine. Will report if issues detected . Thanks
System: Synology Container

Gramps 6.0.1
Gramps Web API 3.0.0-dev
Gramps Web Frontend 25.4.1
Gramps QL 0.4.0
Sifts 1.0.0
locale: en
multi-tree: false
task queue: false
OCR: true
chat: false

Web Sync v.1.3.2 runs without any complaints.
Thanks a lot @DavidMStraub

Good, a warning though: Gramps types are not handled correctly when syncing new objects from local to remote. It took me a while to understand what the problem is, now I still need to fix it (it’s only on Web API side, not in the sync addon). I’ll post here when it’s fixed.

Hi guys
I can confirm all is nice with Web Sync v1.3.2
Thanks

I’ll do some more tests

All issues I was ware of should now be fixed in the latest image. If nothing else popsup, we can release Web API 3.0 next week.

It looks like an old problem has reappeared with Web Sync.
In the “Final confirmation” it reports 57 changes in Gramps Web.
I know for sure that no updates has been made thru Gramps Web.

Workaround is to run “Reset remote to local”
@DavidMStraub But before I do that, is there something I should investigate?

Could those 57 objects be objects that you synced/changed with 6.0 before the latest version?

In any case, here are some steps that would be useful for debugging:

  • Please check the timestamp value in ~/.config/gramps/gramps60/plugins/webapisync.ini and compare it to the local and remote last changed time stamps of one or two of the “simultaneously changed” objects. Is it before or after?
  • Please generate a Gramps XML export on the local and remote sides and compare the XML element of one or two of the “simultaneously changed” objects. Any differences apart from timestamp?

Thanks

By the way, if the ini file doesn’t exist because you haven’t synced with 6.0 before, the addon might simply flag the changes as “simultaneously changed” because it cannot detect (based on timestamps alone) on which side they were changed. In that case, there is no need to debug - simply select “reset remote to local” once until both sides are in sync again.

In the upgrade docs, we’ll advise users to sync once before the upgrade, so the trees are initially in sync.

The timestamp in webapisync.ini is 1746090146 (Thu May 01 2025 09:02:26 GMT)
This is very close to the Gramps Web timestamps of the samples below.

Here’s two examples, that the Web Sync reports changed on the Gramps Web.
Both have a timestamp that is newer (higher) in Gramps Web, but there is also some other differences.
For id=I0027 the <name> tag has an attribute (type=“Birth Name”) in Gramps Desktop, but no attribute in Gramps Web
For id=F0305 there are several differences.
And one more difference - export from Gramps Desktop is version 6.0.0, while Gramps Web is 6.0.1

<     <created date="2025-05-03" version="6.0.0"/>
---
>     <created date="2025-05-03" version="6.0.1"/>

Gramps Desktop:

    <person handle="_f8ec44af5a43fdb3e15b486fede" change="1745831567" id="I0027">
      <gender>F</gender>
      <name type="Birth Name">

Gramps Web:

    <person handle="_f8ec44af5a43fdb3e15b486fede" change="1746090135" id="I0027">
      <gender>F</gender>
      <name>

Gramps Desktop:

    <family handle="_fe13841db422cac75e53b8017cc" change="1746002762" id="F0305">
      <rel type="Married"/>
      <father hlink="_fe138429c083d942cc8417f0956"/>
      <mother hlink="_fe138477b3d6b1c4af233e0ab88"/>
      <eventref hlink="_fe1394eaa50552e402c61e4263" role="Family"/>
      <childref hlink="_fe13a728d0478068de351a8777"/>
      <childref hlink="_fe13a84ab1a7df6e7615693e676"/>
      <childref hlink="_fe13a902d70644acb41922f7551"/>
      <childref hlink="_fe13a9cca1724681014c8b780ed"/>
      <childref hlink="_fa91adf20fc1ac7ce9efdf2ee3a"/>
    </family>

Gramps Web:

    <family handle="_fe13841db422cac75e53b8017cc" change="1746090135" id="F0305">
      <father hlink="_fe138429c083d942cc8417f0956"/>
      <mother hlink="_fe138477b3d6b1c4af233e0ab88"/>
      <eventref hlink="_fe1394eaa50552e402c61e4263"/>
      <childref hlink="_fe13a728d0478068de351a8777" mrel="" frel=""/>
      <childref hlink="_fe13a84ab1a7df6e7615693e676" mrel="" frel=""/>
      <childref hlink="_fe13a902d70644acb41922f7551" mrel="" frel=""/>
      <childref hlink="_fe13a9cca1724681014c8b780ed" mrel="" frel=""/>
      <childref hlink="_fa91adf20fc1ac7ce9efdf2ee3a" mrel="" frel=""/>
    </family>

I suggest updating desktop to 6.0.1 as well (but I don’t think this will solve the problem).

The problems are a missing name type and relationship type. This looks like the problem I mentioned above:

This should now be resolved, but I think the reason you are seeing simultaneous changes is because the object was created on desktop, then synced to remote but without the correct types, so now the sync addon detects a difference between them and they have a timestamp after the last successful sync. So flagging them as simultaneously modified is technically correct.

Long story short, I think it’s not a bug in the current version but a result of a previous bug, and selecting “reset remote to local” should fix it permanently.

The installation image is 6.0.1-1 (MacOS), but the reported version is still 6.0.0

Pulling the new grampsweb (latest-devel) right now.

Will do a “reset remote to local”.

There is something spooky!

Here’s what I did:
Updated Gramps Web to newest latest-devel images.
Ran Web Sync “Reset remote to local”.
Reran Web Sync - nothing to update.
Generated Gramps XML on both sides, and ran a diff on the two files.
Found 3 occurrences where <name> tag had type attribute only on desktop side.
Made an update on these 3 persons on desktop to invoke a sync.
I then ran Web Sync which listed the 3 person as “Local changes”, but executing the sync resulted in this error:

18063891: ERROR: webapihandler.py: line 271: Server task failed: {'info': '??? Unknown Error: None', 'result': '??? Unknown Error: None', 'result_object': '??? Unknown Error: None', 'state': 'FAILURE'}

When I ran Web Sync again, I get the 3 persons as modified on remote