Export including media

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Export including media

Elvin Birth
I am trying unsuccessfully to create a .gpkg file from: 
GRAMPS: 4.2.2 
Python: 3.4.3 (default, Jan  7 2016, 15:03:03) [... 
BSDDB: 5.3.0 (4, 8, 30) 
LANG: en_US.UTF-8
OS: Darwin
Distribution: 15.6.0

If the fix is defined in the error message, I need help to interpret and apply. I can find the  lines in BBEdit but I am lost beyond that.

Error Detail

672088: ERROR: _exportassistant.py: line 600: Error exporting your Family Tree
Traceback (most recent call last):
  File "/Applications/Gramps.app/Contents/Resources/lib/python3.4/site-packages/gramps/gui/plug/export/_exportassistant.py", line 596, in save
    self.option_box_instance)
  File "/Applications/Gramps.app/Contents/Resources/lib/python3.4/site-packages/gramps/plugins/export/exportpkg.py", line 87, in writeData
    return writer.export()
  File "/Applications/Gramps.app/Contents/Resources/lib/python3.4/site-packages/gramps/plugins/export/exportpkg.py", line 189, in export
    archive.add(filename, archname)
  File "/Applications/Gramps.app/Contents/Resources/lib/python3.4/tarfile.py", line 1923, in add
    self.addfile(tarinfo, f)
  File "/Applications/Gramps.app/Contents/Resources/lib/python3.4/tarfile.py", line 1946, in addfile
    buf = tarinfo.tobuf(self.format, self.encoding, self.errors)
  File "/Applications/Gramps.app/Contents/Resources/lib/python3.4/tarfile.py", line 805, in tobuf
    return self.create_gnu_header(info, encoding, errors)
  File "/Applications/Gramps.app/Contents/Resources/lib/python3.4/tarfile.py", line 836, in create_gnu_header
    return buf + self._create_header(info, GNU_FORMAT, encoding, errors)
  File "/Applications/Gramps.app/Contents/Resources/lib/python3.4/tarfile.py", line 919, in _create_header
    itn(info.get("mtime", 0), 12, format),
  File "/Applications/Gramps.app/Contents/Resources/lib/python3.4/tarfile.py", line 206, in itn
    s.insert(1, n & 0o377)
TypeError: unsupported operand type(s) for &: 'float' and 'int'

Elvin Birth

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|

Re: Export including media

Ron Johnson

v4.2.2 is pretty old.  try upgrading to v4.2.8.

Does a non-media backup succeed?  (If all your genealogy documents are in their own folder and it's *only* genealogy documents, you really don't need a .gpkg backup.)

On 02/22/2018 01:50 PM, Elvin Birth wrote:
I am trying unsuccessfully to create a .gpkg file from: 
GRAMPS: 4.2.2 
Python: 3.4.3 (default, Jan  7 2016, 15:03:03) [... 
BSDDB: 5.3.0 (4, 8, 30) 
LANG: en_US.UTF-8
OS: Darwin
Distribution: 15.6.0

If the fix is defined in the error message, I need help to interpret and apply. I can find the  lines in BBEdit but I am lost beyond that.

Error Detail

672088: ERROR: _exportassistant.py: line 600: Error exporting your Family Tree
Traceback (most recent call last):
  File "/Applications/Gramps.app/Contents/Resources/lib/python3.4/site-packages/gramps/gui/plug/export/_exportassistant.py", line 596, in save
    self.option_box_instance)
  File "/Applications/Gramps.app/Contents/Resources/lib/python3.4/site-packages/gramps/plugins/export/exportpkg.py", line 87, in writeData
    return writer.export()
  File "/Applications/Gramps.app/Contents/Resources/lib/python3.4/site-packages/gramps/plugins/export/exportpkg.py", line 189, in export
    archive.add(filename, archname)
  File "/Applications/Gramps.app/Contents/Resources/lib/python3.4/tarfile.py", line 1923, in add
    self.addfile(tarinfo, f)
  File "/Applications/Gramps.app/Contents/Resources/lib/python3.4/tarfile.py", line 1946, in addfile
    buf = tarinfo.tobuf(self.format, self.encoding, self.errors)
  File "/Applications/Gramps.app/Contents/Resources/lib/python3.4/tarfile.py", line 805, in tobuf
    return self.create_gnu_header(info, encoding, errors)
  File "/Applications/Gramps.app/Contents/Resources/lib/python3.4/tarfile.py", line 836, in create_gnu_header
    return buf + self._create_header(info, GNU_FORMAT, encoding, errors)
  File "/Applications/Gramps.app/Contents/Resources/lib/python3.4/tarfile.py", line 919, in _create_header
    itn(info.get("mtime", 0), 12, format),
  File "/Applications/Gramps.app/Contents/Resources/lib/python3.4/tarfile.py", line 206, in itn
    s.insert(1, n & 0o377)
TypeError: unsupported operand type(s) for &: 'float' and 'int'

Elvin Birth



--
Money Angular momentum makes the world go 'round.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|

Re: Export including media

prculley
I'm pretty sure I've isolated the bug.  It is because one or more of your media files has a create or modify timestamp with a fractional seconds value.
If you are interested in trying to patch it yourself, you can try editing the Gramps source file
"/Applications/Gramps.app/Contents/Resources/lib/python3.4/site-packages/gramps/plugins/export/exportpkg.py"
and changing line 176 from
            archive = tarfile.open(self.filename,'w:gz')
to
            archive = tarfile.open(self.filename,'w:gz', format=tarfile.PAX_FORMAT)

This should allow the backup to proceed.  I've added a note to https://gramps-project.org/bugs/view.php?id=10424 explaining in a bit more detail.

If you try this patch, please let us know if it works.

Paul C.


On Thu, Feb 22, 2018 at 3:33 PM, Sam Manzi <[hidden email]> wrote:
Hi Elvin,

If you create a new family tree and add one person and one media item, then attempt to backup does the same issue occur for you?

Kind regards
-
Sam

PS: This has been reported as issue 10242: backup is not working

https://gramps-project.org/bugs/view.php?id=10424

but as we've had no feedback from the reporter on how to recreate this issue it's been difficult to isolate and diagnose.


On 23 February 2018 at 07:34, Ron Johnson <[hidden email]> wrote:

v4.2.2 is pretty old.  try upgrading to v4.2.8.

Does a non-media backup succeed?  (If all your genealogy documents are in their own folder and it's *only* genealogy documents, you really don't need a .gpkg backup.)


On 02/22/2018 01:50 PM, Elvin Birth wrote:
I am trying unsuccessfully to create a .gpkg file from: 
GRAMPS: 4.2.2 
Python: 3.4.3 (default, Jan  7 2016, 15:03:03) [... 
BSDDB: 5.3.0 (4, 8, 30) 
LANG: en_US.UTF-8
OS: Darwin
Distribution: 15.6.0

If the fix is defined in the error message, I need help to interpret and apply. I can find the  lines in BBEdit but I am lost beyond that.

Error Detail

672088: ERROR: _exportassistant.py: line 600: Error exporting your Family Tree
Traceback (most recent call last):
  File "/Applications/Gramps.app/Contents/Resources/lib/python3.4/site-packages/gramps/gui/plug/export/_exportassistant.py", line 596, in save
    self.option_box_instance)
  File "/Applications/Gramps.app/Contents/Resources/lib/python3.4/site-packages/gramps/plugins/export/exportpkg.py", line 87, in writeData
    return writer.export()
  File "/Applications/Gramps.app/Contents/Resources/lib/python3.4/site-packages/gramps/plugins/export/exportpkg.py", line 189, in export
    archive.add(filename, archname)
  File "/Applications/Gramps.app/Contents/Resources/lib/python3.4/tarfile.py", line 1923, in add
    self.addfile(tarinfo, f)
  File "/Applications/Gramps.app/Contents/Resources/lib/python3.4/tarfile.py", line 1946, in addfile
    buf = tarinfo.tobuf(self.format, self.encoding, self.errors)
  File "/Applications/Gramps.app/Contents/Resources/lib/python3.4/tarfile.py", line 805, in tobuf
    return self.create_gnu_header(info, encoding, errors)
  File "/Applications/Gramps.app/Contents/Resources/lib/python3.4/tarfile.py", line 836, in create_gnu_header
    return buf + self._create_header(info, GNU_FORMAT, encoding, errors)
  File "/Applications/Gramps.app/Contents/Resources/lib/python3.4/tarfile.py", line 919, in _create_header
    itn(info.get("mtime", 0), 12, format),
  File "/Applications/Gramps.app/Contents/Resources/lib/python3.4/tarfile.py", line 206, in itn
    s.insert(1, n & 0o377)
TypeError: unsupported operand type(s) for &: 'float' and 'int'

Elvin Birth



--
Money Angular momentum makes the world go 'round.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org