[Linux] Export as pdf impossible, cannot determine file type

• Feb 18, 2013 - 15:27
Type
Functional
Severity
3
Status
closed
Project

GIT commit: c7a380c
Mint14 64

Trying to export as pdf a file named "a_l'heure_accoutumee" I receive message "Ne peut pas déterminer le type de fichier"


Comments

The given name does indeed include the suffix, but I just gave the non trivial part of the name, thinking that perhaps the length, or the underscores were involved

Seems to be a Linux problem, as it work just fine on Win XPpro SP3?
What file system type do you try to store to?
Is it the ' that makes it fail, maybe?

the file system is a standard linux system ext4 with which I have no problem to handle any file, even named with non «basic» characters, except with musescore

trying to save as «essai.pdf» I get the same error

perhaps this is related with the fact that the «use native dialogs» tick in Preferences General is inoperant , and that filenames with some UTF8 aren't seen, two «bugs» I think I've previously declared, and which doesn't appear in MuseScore 1.2

I just used Save a copy with the name «a_l'heure_accoutumee_alias»

so it seems that the problem is associated with PDF export, and not to all repertory handling within musescore under Linux

BTW could some Linuxian check with other distributions ?

Still doesn't work with the current git trunk:

commit f5e8522b11fe48ac2cd317cff8454f98109ac643

On linux fedora 20 64 bits.

Could be that MuseScore doesn't have the right file permissions to save the file.

I have had problems with this in the past with Ubuntu.

If MuseScore isn't in the right user group to save PDF then the save will fail.

What is strange is that I am able to save mcsz files in the same directory and I am able to save pdf files via the print to pdf menu.
So, it looks like I have the good rights to save in this directory.

Title Export as pdf impossible [Linux ]Export as pdf impossible, cannot determine file type
Severity
Status (old) active needs info

Do you have the same message than previously? "Cannot determine filetype".
In Edit ->preferences -> General, the tick "use native dialog" is ticked or not?

You may have the necessary rights to save PDF files in that directory, but MuseScore may not.

I would check that MuseScore belongs to the right groups.

As I said my experience is with Ubuntu - it may be different in Fedora

That's odd, now it works. I was not able to make it works yesterday and today (after a git pull), it just works.
Maybe it's time to close this one ...

It might be a Linux-specific issue and it is related with the fact that the "Export" dlg box does not add the file extension until the "Files of type:" drop list is clicked and some selection is made in it.

I can consistently reproduce the issue with the following steps:

1) Open any score
2) Select "File | Export" and accept the current file name and file type, without opening the file type drop list
3) Press [OK]

Result: An error message appears saying "cannot determine file type".

As the file type drop list in the Export dlg defaults to "PDF", it is easy to get this error with PDF.

As a counter-evidence:

1) Open any score
2) Select "File | Export"
3) Press the file type drop list and select "PDF" => the ".pdf" extension is added to the output file name
4) Press [OK}

Result: The file is correctly exported without any error message.

M.

Severity
Status (old) needs info active

the change from mscx to pdf as the default was intentional, I guess dropping the extension was not ;-)

Title [Linux ]Export as pdf impossible, cannot determine file type [Linux] Export as pdf impossible, cannot determine file type
Severity
Status (old) active patch (code needs review)

The regression is here: https://github.com/musescore/MuseScore/commit/f044eec

The value put by default in the file name field must explicitly contain the extension, as it was the case before this commit when the filter .mscx was the first listed:

QString name = QString("%1/%2.mscx").arg(saveDirectory).arg(cs->name());

The commit stripped the extension instead of updating it for .pdf:

QString name = QString("%1/%2").arg(saveDirectory).arg(cs->name());

It seems that the reason why the extension must be explicitly added for the default value is that the extension is handled automatically by the method MuseScore::saveScoreDialogFilterSelected() only when a new value is selected in the filter list, so not for the default value. That's why if we manually select PDF in the list, the extension is added. However, I don't know why it's a Linux only issue.

PR: https://github.com/musescore/MuseScore/pull/1384