unoconv aborts if output file is in /tmp and named "out.xlsx"

Bug #1915362 reported by jimav
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
unoconv (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

This is hard to believe, so I'm reluctant to submit this. But here it is:

If the effective output file path specified -o <path> is a certain filename, then unoconv aborts with an exception, but no abort occurs if a different file name or directory is used (and yes, I checked that the file did not already exist). For me, outputting to "out.xlsx" when in /tmp aborted but not if using any other output filename; however when in some other directory (/home/myuser/ptmp/J), output to "xout.xlsx" started aborting but using "out.xlsx" worked without error.

So there is some kind of state which remembers past file names (or something) and causes havoc.

I tried temporarily removing $HOME/.config/libreoffice* but that did not help (also tried setting the UserInstallation environment variable).

The exception is:

document.storeToURL(outputurl, tuple(outputprops) )
uno.IOException: SfxBaseModel::impl_store <file:///tmp/out.xlsx> failed: 0x11b(Error Area:Io Class:Abort Code:27)

$ ls -ld /tmp
drwxrwxrwt 31 root root 980 Feb 10 18:46 /tmp/

$ mount | grep /tmp
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime,size=52428800k)

$ df -h /tmp
Filesystem Size Used Avail Use% Mounted on
tmpfs 50G 572K 50G 1% /tmp

$ unoconv --version
unoconv 0.7
platform posix/linux
python 3.8.5 (default, Jul 28 2020, 12:59:40)
[GCC 9.3.0]
LibreOffice 6.4.6.2

I tried a new, clean user-config directory, thinking there might be something corrupted in mine; but it makes no difference (export UserInstallation... in the script below)

*** STEPS TO REPRODUCE ***

1. cd /tmp
2. echo "foo,bar" >demo.csv
3. unoconv -d spreadsheet -f xlsx -o out.xlsx demo.csv
   (or try xout.xlsx, alternating between tries)

RESULTS:

Traceback (most recent call last):
  File "/usr/bin/unoconv", line 1037, in convert
    document.storeToURL(outputurl, tuple(outputprops) )
uno.IOException: SfxBaseModel::impl_store <file:///tmp/out.xlsx> failed: 0x11b(Error Area:Io Class:Abort Code:27)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/unoconv", line 1282, in <module>
    main()
  File "/usr/bin/unoconv", line 1198, in main
    convertor.convert(inputfn)
  File "/usr/bin/unoconv", line 1039, in convert
    raise UnoException("Unable to store document to %s (ErrCode %d)\n\nProperties: %s" % (outputurl, e.ErrCode, outputprops), None)
  File "/usr/lib/python3/dist-packages/uno.py", line 516, in _uno_struct__getattr__
    return getattr(self.__dict__["value"], name)
AttributeError: ErrCode

NOTE: Change "out.xlsx" to "xout.xlsx" and no error occurs!

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: unoconv 0.7-2
ProcVersionSignature: Ubuntu 5.4.0-65.73-generic 5.4.78
Uname: Linux 5.4.0-65-generic x86_64
ApportVersion: 2.20.11-0ubuntu27.16
Architecture: amd64
CasperMD5CheckResult: skip
CurrentDesktop: ubuntu:GNOME
Date: Wed Feb 10 18:39:17 2021
InstallationDate: Installed on 2020-03-24 (323 days ago)
InstallationMedia: Ubuntu 19.10 "Eoan Ermine" - Release amd64 (20191017)
PackageArchitecture: all
SourcePackage: unoconv
UpgradeStatus: Upgraded to focal on 2020-05-16 (270 days ago)

Revision history for this message
jimav (james-avera) wrote :
description: updated
jimav (james-avera)
description: updated
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in unoconv (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.