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

UnicodeDecodeError when attempting --export-storage in 1.1.4 #666

Closed
gx42 opened this issue Jul 22, 2017 · 2 comments
Closed

UnicodeDecodeError when attempting --export-storage in 1.1.4 #666

gx42 opened this issue Jul 22, 2017 · 2 comments

Comments

@gx42
Copy link

gx42 commented Jul 22, 2017

I've been trying to export my calendar from 1.1.4, but I keep getting the following exception:

gx42@PC:~/bin/Radicale-1.1.4$ python3 radicale.py --config config --export-storage ./export/
INFO: Exporting storage for Radicale 2.0.0 to './export/'
Traceback (most recent call last):
  File "radicale.py", line 32, in <module>
    radicale.__main__.run()
  File "/home/g/bin/Radicale-1.1.4/radicale/__main__.py", line 162, in run
    export_storage(config, options.export_storage)
  File "/home/g/bin/Radicale-1.1.4/radicale/__main__.py", line 76, in export_storage
    for component in collection.components:
  File "/home/g/bin/Radicale-1.1.4/radicale/ical.py", line 477, in components
    return [item for item in self.items.values() if item.tag in tags]
  File "/home/g/bin/Radicale-1.1.4/radicale/ical.py", line 464, in items
    self.text, (Event, Todo, Journal, Card, Timezone))
  File "/home/g/bin/Radicale-1.1.4/radicale/storage/filesystem.py", line 94, in text
    return fd.read()
  File "/usr/lib/python3.4/codecs.py", line 694, in read
    return self.reader.read(size)
  File "/usr/lib/python3.4/codecs.py", line 497, in read
    newchars, decodedbytes = self.decode(data, self.errors)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8c in position 0: invalid start byte
gx42@PC:~/bin/Radicale-1.1.4$ 

Radicale otherwise functions normally. I'm running Ubuntu 14.04 (64 bit) and Python 3.4.3.

@Unrud
Copy link
Collaborator

Unrud commented Jul 22, 2017

The problem seems to be that Radicale 1.1.4 can't read the calendar data. The exception doesn't happen in the export code.

It looks like your storage folder contains some binary file, that shouldn't be there.

@gx42
Copy link
Author

gx42 commented Jul 22, 2017

You were right- I had a .hg directory under Collections which I didn't think would affect Radicale, but removing it fixed the exporting issue. Thanks!

@gx42 gx42 closed this as completed Jul 22, 2017
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