Skip to content

Use "utf8" encoding in takesnapshot.log (was: UnicodeEncodeError) #2298

@geoff-goldman

Description

@geoff-goldman

Hi, new install on an RPI3B running Debian Trixie.

When running backintime backup the following error occurs:

root@raspberrypi3-01:~# backintime backup

Back In Time
Version: 1.5.5

Back In Time comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions; type `backintime --license' for details.

INFO: Lock
Traceback (most recent call last):
  File "/usr/share/backintime/common/backintime.py", line 1335, in <module>
    startApp()
    ~~~~~~~~^^
  File "/usr/share/backintime/common/backintime.py", line 585, in startApp
    args.func(args)
    ~~~~~~~~~^^^^^^
  File "/usr/share/backintime/common/backintime.py", line 852, in backup
    ret = takeSnapshot(cfg, force)
  File "/usr/share/backintime/common/backintime.py", line 100, in takeSnapshot
    ret = snapshots.Snapshots(cfg).backup(force)
  File "/usr/share/backintime/common/snapshots.py", line 827, in backup
    self.setTakeSnapshotMessage(0, '\u2026')
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
  File "/usr/share/backintime/common/snapshots.py", line 182, in setTakeSnapshotMessage
    self.snapshotLog.append('[I] ' + message, 3)
    ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/backintime/common/snapshotlog.py", line 241, in append
    self.logFile.write(msg + '\n')
    ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
UnicodeEncodeError: 'latin-1' codec can't encode character '\u2026' in position 4: ordinal not in range(256)

If additional info is required please let me know.

Thanks,

Geoff

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions