sugarlabs / sugar

Sugar GTK shell
GNU General Public License v3.0
257 stars 242 forks source link

Copy to Documents fails with TypeError #853

Closed quozl closed 5 years ago

quozl commented 5 years ago
Traceback (most recent call last):
  File "/usr/lib/python3.7/dist-packages/jarabe/journal/palettes.py", line 398, in __copy_to_volume_cb
    model.copy(metadata, self._mount_point)
  File "/usr/lib/python3.7/dist-packages/jarabe/journal/model.py", line 700, in copy
    ready_callback=ready_callback)
  File "/usr/lib/python3.7/dist-packages/jarabe/journal/model.py", line 740, in write
    metadata, file_path, ready_callback=ready_callback)
  File "/usr/lib/python3.7/dist-packages/jarabe/journal/model.py", line 859, in _write_entry_on_external_device
    os.write(fh, metadata_json)
TypeError: a bytes-like object is required, not 'str'

Object being copied was from Browse activity.

quozl commented 5 years ago

Fixed in https://github.com/sugarlabs/sugar/commit/68321ffe4f53543d9e4f1533ce07164afa303d95