--- a/src/eric7/PdfViewer/PdfViewerWindow.py Fri Mar 08 15:51:14 2024 +0100 +++ b/src/eric7/PdfViewer/PdfViewerWindow.py Fri Mar 08 16:08:43 2024 +0100 @@ -11,7 +11,16 @@ import os import pathlib -from PyQt6.QtCore import QBuffer, QByteArray, QIODevice, QPointF, QSize, Qt, pyqtSignal, pyqtSlot +from PyQt6.QtCore import ( + QBuffer, + QByteArray, + QIODevice, + QPointF, + QSize, + Qt, + pyqtSignal, + pyqtSlot, +) from PyQt6.QtGui import QAction, QActionGroup, QClipboard, QGuiApplication, QKeySequence from PyQt6.QtPdf import QPdfDocument, QPdfLink from PyQt6.QtPdfWidgets import QPdfView @@ -81,7 +90,7 @@ if not self.__fromEric: self.setStyle(Preferences.getUI("Style"), Preferences.getUI("StyleSheet")) - self.__remotefsInterface =( + self.__remotefsInterface = ( ericApp().getObject("EricServer").getServiceInterface("FileSystem") if self.__fromEric else None @@ -986,7 +995,7 @@ return else: buffer = None - + while not canceled and err == QPdfDocument.Error.IncorrectPassword: if FileSystemUtilities.isRemoteFileName(fileName): buffer.open(QIODevice.OpenModeFlag.ReadOnly)