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

Error when exporting individual book files when a filename is too long #26

Closed
ngm opened this issue Oct 22, 2022 · 6 comments
Closed

Error when exporting individual book files when a filename is too long #26

ngm opened this issue Oct 22, 2022 · 6 comments

Comments

@ngm
Copy link

ngm commented Oct 22, 2022

Steps:

  • Mount Kobo e-reader (that is running koreader)
  • Start KoHighlights from command line
  • Scan Directory (/media/user/KOBOeReader/)
  • Select all files in list with Ctrl-A
  • Ctrl-S to Export selected highlights
  • Select 'As individual book files'

The interface can still be used, but the three progress dots continue to animate, and at the command line, I see the error:

IOError: [Errno 36] File name too long: "/home/neil/org/book-highlights/p2pmodels.eu - David Bollier_ \xe2\x80\x9cIn digital contexts, the whole social dimensions of the stewardship and curation of a Commons don't really get adequate attention\xe2\x80\x9d - P2P Models.txt"

And not all of the files are exported because it has got stuck on this one.

OS: Linux Mint
KoHighlights: 1.5.0.0

@noembryo
Copy link
Owner

OK. "File name too long". A file system limitation (or at least a limitation in the way Qt accesses the file system).

What the program should do, is skip this error and continue with the export.
To do that, I have to find out where in the code the error is happening, and warn the user about it.

Somewhere at the user part of the file system, (something like ~/.config/KOHighlights/), should be some error_log_2022-xx-xx.txt files that have the same error but with code line numbers.
It would save me some time if you post them here.
I will look at it anyway.. 🙏

@ngm
Copy link
Author

ngm commented Oct 22, 2022

Thanks! Sorry, should have pasted that full traceback earlier, here it is:

Original exception was:
Traceback (most recent call last):
  File "secondary.py", line 400, in on_export_btn_clicked
  File "main.py", line 2209, in on_export
  File "main.py", line 2227, in export
  File "main.py", line 2289, in save_multi_files
IOError: [Errno 36] File name too long: "/home/neil/org/book-highlights/p2pmodels.eu - David Bollier_ \xe2\x80\x9cIn digital contexts, the whole social dimensions of the stewardship and curation of a Commons don't really get adequate attention\xe2\x80\x9d - P2P Models.txt"

@ngm
Copy link
Author

ngm commented Oct 22, 2022

P.S. in the file error_log_2022-10-22.txt I just see the following:

Crash@2022-10-22 10:08:13

Crash@2022-10-22 10:30:52

The traceback above I copied from the command line output.

@noembryo
Copy link
Owner

Crash@2022-10-22 10:30:52

Yeah, worst logging ever.. 😁
(Actually there is no logging at all in the script, just a hack)
Thanks for your info, though!

@noembryo
Copy link
Owner

Next version will have a fix for that.. 🙏

@noembryo
Copy link
Owner

Fixed (!) in v1.6.0.0.. 😉

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