diff --git a/src/xpra/net/file_transfer.py b/src/xpra/net/file_transfer.py index a0874b4e01..4330a46ea6 100644 --- a/src/xpra/net/file_transfer.py +++ b/src/xpra/net/file_transfer.py @@ -319,7 +319,14 @@ def delfile(): printlog.error(" printers available: %s", csv(printers.keys()) or "none") delfile() return - job = print_files(printer, [filename], title, options) + try: + job = print_files(printer, [filename], title, options) + except Exception as e: + printlog("print_files%s", (printer, [filename], title, options), exc_info=True) + printlog.error("Error: cannot print file '%s'", os.path.basename(filename)) + printlog.error(" %s", e) + delfile() + return printlog("printing %s, job=%s", filename, job) if job<=0: printlog("printing failed and returned %i", job) diff --git a/src/xpra/platform/pycups_printing.py b/src/xpra/platform/pycups_printing.py index 9df587019e..f0258df885 100755 --- a/src/xpra/platform/pycups_printing.py +++ b/src/xpra/platform/pycups_printing.py @@ -402,7 +402,7 @@ def print_files(printer, filenames, title, options): raise Exception("invalid printer: '%s'" % printer) log("pycups.print_files%s", (printer, filenames, title, options)) actual_options = DEFAULT_CUPS_OPTIONS.copy() - actual_options.update(options) + actual_options.update(dict(str(k),str(v) for k,v in options.items())) if SIMULATE_PRINT_FAILURE: log.warn("Warning: simulating print failure") conn = None