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

Fails to export to CSV and HTML #31

Closed
mikelolasagasti opened this issue Sep 6, 2020 · 0 comments
Closed

Fails to export to CSV and HTML #31

mikelolasagasti opened this issue Sep 6, 2020 · 0 comments
Labels
Milestone

Comments

@mikelolasagasti
Copy link
Owner

Exporting a Revelation file to HTML or CSV crash at entrylist.sort:

For HTML:

  File "/usr/local/bin/revelation", line 235, in <lambda>
    action.connect("activate",      lambda w,k: self.file_export())
  File "/usr/local/bin/revelation", line 1457, in file_export
    datafile.save(self.entrystore, file, password)
  File "/usr/local/lib64/python3.8/site-packages/revelation/io.py", line 124, in save
    file_write(file, self.__handler.export_data(entrystore, password))
  File "/usr/local/lib64/python3.8/site-packages/revelation/datahandler/xhtml.py", line 562, in export_data
    xhtml += self.__generate_sidebar(entrystore)
  File "/usr/local/lib64/python3.8/site-packages/revelation/datahandler/xhtml.py", line 433, in __generate_sidebar
    xhtml += self.__generate_sidebar_accountlist(entrystore)
  File "/usr/local/lib64/python3.8/site-packages/revelation/datahandler/xhtml.py", line 473, in __generate_sidebar_accountlist
    entrylist.sort(lambda x,y: cmp(x.name.lower(), y.name.lower()))
TypeError: sort() takes no positional arguments

For CSV:

  File "/usr/local/bin/revelation", line 235, in <lambda>
    action.connect("activate",      lambda w,k: self.file_export())
  File "/usr/local/bin/revelation", line 1457, in file_export
    datafile.save(self.entrystore, file, password)
  File "/usr/local/lib64/python3.8/site-packages/revelation/io.py", line 124, in save
    file_write(file, self.__handler.export_data(entrystore, password))
  File "/usr/local/lib64/python3.8/site-packages/revelation/datahandler/csvfile.py", line 37, in export_data
    entries.sort(lambda x,y: cmp(x.name.lower(), y.name.lower()))
TypeError: sort() takes no positional arguments

Needs to be adapted to Python3

@mikelolasagasti mikelolasagasti added this to the 0.5.3 milestone Sep 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant