Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gramps XML export fails with 'can only concatenate str (not "NoneType") to str #474

Closed
EvilCartyen opened this issue Jul 27, 2024 · 9 comments

Comments

@EvilCartyen
Copy link

I imported a family tree-backup from the desktop version to gramps web, and now I've done a bunch of work on it (thanks for the tool!), and would like to back it up but I am met with this error when trying.

image

I assume I have some weird data somewhere, but I am not sure how to proceed to fix it.

@DavidMStraub
Copy link
Member

Hi,

that error is already tracked here
gramps-project/gramps-web-api#479
so I will close this one.

But it would be great if you could help investigate.

Can you please go to the list views (people etc.), open the filter, choose GQL and try out the following filter:

media_list.any = None

for all of the object types except media and notes? Does it give any results?

Background: There is an object in your database that has a None as handle in the media list.

@EvilCartyen
Copy link
Author

Thanks - no results, though. I restarted the container and tried again, still no result, and also same error when exporting.

My instance is public if you want to investigate :)

@DavidMStraub
Copy link
Member

😱 public?

@EvilCartyen
Copy link
Author

I mean, a public URL but you need an account still, of course...

@EvilCartyen
Copy link
Author

Anyway, I would appreciate suggestions on how to proceed, I an uneasy having no backups with all the work I have been doing :)

@DavidMStraub
Copy link
Member

Yep understood. So you need to find out which of your objects has a "None" in the media_list. Would you feel confident enough to manually query the API via command line?

https://www.grampsweb.org/dev-backend/queries/

You need to fetch the /api/people, etc. for the other object types, endpoints and check where there is a None in the media_list.

You could also employ my poorly known library https://github.com/DavidMStraub/gramps-web-api-client.

@EvilCartyen
Copy link
Author

I finally got around to learning how to do this - sorry for being slow :) Anyway, I queries the API and retrieved:

  • citations
  • events
  • families
  • media
  • notes
  • people
  • places
  • repositories
  • sources

None of them (heh) have 'None' written anywhere in the json, but maybe I am searching for the wrong thing. What exactly am I looking for? :)

@DavidMStraub
Copy link
Member

Python None corresponds to null in JS, perhaps that?

@EvilCartyen
Copy link
Author

All dates have a "format": null value - what exactly am I looking for?

"media_list": [
 null
],

?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants