07-04-2010, 08:12 PM | #1 |
Junior Member
Posts: 3
Karma: 10
Join Date: Feb 2009
Location: UK
Device: PRS505
|
Calibre 0.7.x can't open UNC path
Hi,
I have just upgraded from .6 to .7, and am experiencing some strange issues. I store my DB and files on a share accessed by UNC. e.g. \\server\ebooks\Iain Banks\Complicity The books are accessible to Calibre and it can copy them accross to my ebook reader, however hitting "o" or clicking the hyperlink to open the folder fails. I don;t get any error messages, and the program doesn;t hang.. it just doesn't do anything. I'[ve been running like this for a couple of years without any issues, and it's only since I upgraded that it's occurred. I'm on 0.7.7 and the issue still remains. Does anyone know what the issue is and do you have a workaround. Thanks, Adam |
07-04-2010, 08:27 PM | #2 |
US Navy, Retired
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
|
Advert | |
|
07-05-2010, 04:31 AM | #3 | |
Zealot
Posts: 115
Karma: 150
Join Date: Jul 2008
Location: Netherlands Veenendaal
Device: Palm T5, Sony PRS-505, Nook Color
|
Quote:
If you can't map a drive, for what ever reason, I might be willing to upload a recompiled QT-4.6.2 dll for you. I found a bug report in QT's bugtracker but doubt if they are going to fix it. Didn't see any developers comments except 'future version' status Maybe the simplest solution would be to directly call ShellExecute from Calibre instead of going through QDesktopServices.openUrl() which contains this bug. I'll check later today and if viable I'll post a simple patch until this is resolved by QT or incorporated into Caliber. Regards, Joop |
|
07-06-2010, 05:54 PM | #4 |
Junior Member
Posts: 3
Karma: 10
Join Date: Feb 2009
Location: UK
Device: PRS505
|
Thank you for your fast answers.
I have mapped a drive, and it is now behaving normally |
07-07-2010, 08:31 AM | #5 | |
Zealot
Posts: 115
Karma: 150
Join Date: Jul 2008
Location: Netherlands Veenendaal
Device: Palm T5, Sony PRS-505, Nook Color
|
Quote:
- install Calibre-0.7.7 - downloaded the source of calibre-0.7.7 - unpack - rename %INSTALL_DIR%\calibre\Lib\site-packages\calibre\gui2\__init__.pyo to __init__.pyo.orig - find \calibre-0.77\src\calibre\gui2\__init__.py - copy that to %INSTALL_DIR%\Lib\site-packages\calibre\gui2\__init__.py - load __init__.py into an editor - goto line 582 (def open_url(qurl)) - select from 582 to 596 - delete - replace with the following Code:
def open_url(qurl, path): paths = os.environ.get('LD_LIBRARY_PATH', '').split(os.pathsep) paths = [x for x in paths if x] if isfrozen and islinux and paths: npaths = [x for x in paths if x != sys.frozen_path] os.environ['LD_LIBRARY_PATH'] = os.pathsep.join(npaths) if iswindows: os.startfile(path) else: QDesktopServices.openUrl(qurl) if isfrozen and islinux and paths: os.environ['LD_LIBRARY_PATH'] = os.pathsep.join(paths) def open_local_file(path): url = QUrl.fromLocalFile(path) open_url(url, path) - start calibre and hopefully no errors and a working UNC solution. (error might be that indents don't match, python is sensitive to extra spaces, or tabs instead of spaces. Watch out for editors which auto convert spaces<->tabs!!) - rinse and repeat if new version come out and Kovid doesn't like my hacking or there is no other solution. Problem I workaround is QDesktopServices.openUrl(qurl) function which converts qurl back to a localfile but messes up big time on that. Example a = '\\server\path\a.pdf' b = fromLocalFile(a) c = toLocalFile(b) c is not equal to a, it should! It works for me, might not for you, be careful with your data, BACKUP if you don't know what you're doing, Told you, you have been warned! Regards, Joop |
|
Advert | |
|
Tags |
bug |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Default Path Calibre | Themus | Calibre | 2 | 08-12-2010 10:44 PM |
Library using UNC path, PDF's not opening | JvdW | Calibre | 3 | 06-16-2010 10:54 AM |
[Bug] Calibre using all lower case path names | krunk | Calibre | 0 | 05-01-2010 02:58 PM |
Specify liberary path in command line when launching calibre | rollercoaster | Calibre | 2 | 03-04-2010 12:08 AM |
Calibre in Windows path | banjomike | Calibre | 13 | 09-04-2009 12:58 PM |