Page 1 of 1

Write Error. The file could not be written.

Posted: Wed May 25, 2011 8:00 am
by racitup
Hi all,

I recently upgraded to LibreOffice 3.3.2 from OpenOffice 3 (version 3.2.0?) on Linux Ubuntu 10.04 LTS.

It has been working fine (apart from having to manually change the "Open With" OS preferences which didn't seem to be set up properly).
Today however I tried saving a Word .docx format document as DocBook (.xml) format which was working fine with OpenOffice.
But got the error: "Write Error. The file could not be written."
I also saved the file as legacy .doc format and retried the Save As but with the same result.

I have also tried other format files (.odt) with the same result so there is nothing wrong with the input file.

I am using the lucid PPA repository and have tried a re-installation.
Is there any way I can get a debug log from LibreOffice to find out what is going wrong?

Any other ideas?

TIA
Richard

Re: Write Error. The file could not be written.

Posted: Wed May 25, 2011 9:21 am
by Hagar Delest
Hi and welcome to the forum!

See if that query helps.

Please add '[Solved]' at beginning of your first post title (edit button) if your issue has been fixed.

Re: Write Error. The file could not be written.

Posted: Fri Oct 07, 2011 7:07 pm
by n4rky
It did not solve my problem.

I'm running Linux so none of the anti-virus nonsense applies. I have checked write permissions on /tmp; they are normal. No errors are appearing in /var/log/syslog. It would also help considerably if 1) instead of pointing to a query with lots of results all ending with a moderator comment to try this query, that moderator might actually point to some useful advice; and 2) LibreOffice actually produced a meaningful error message.

Re: Write Error. The file could not be written.

Posted: Fri Oct 07, 2011 7:15 pm
by n4rky
Oh, and now it's trying to do it's auto-save thing that's supposed to keep me from losing data. It's pretty obviously failing. But it isn't smart enough to recognize that it's failing, so it just keeps trying over and over again. Which means I can't even copy my data to something else.

This needs to be escalated to a BUG.

Re: Write Error. The file could not be written.

Posted: Fri Oct 07, 2011 7:38 pm
by Bill
There are already bug reports. Unfortunately, no one has posted a way to reproduce the problem. There are many comments about it happening on documents which have remained open for extended periods of time. I've never experienced this error, so I have no idea how to reproduce it or fix it.

Re: Write Error. The file could not be written.

Posted: Fri Oct 07, 2011 7:55 pm
by n4rky
This document had not been open for very long.

If you are unable to reproduce the problem, can you at least make the error messages meaningful? And it shouldn't be all that hard for a program to realize that for whatever reason, it can't write the file, so it should stop trying to auto-save.

Re: Write Error. The file could not be written.

Posted: Fri Oct 07, 2011 9:28 pm
by Bill
n4rky wrote:This document had not been open for very long.

If you are unable to reproduce the problem, can you at least make the error messages meaningful? And it shouldn't be all that hard for a program to realize that for whatever reason, it can't write the file, so it should stop trying to auto-save.
This is a user-to-user forum. As far as I know, no one here was or is involved in the development of OpenOffice.org or LibreOffice.

Re: Write Error. The file could not be written.

Posted: Fri Oct 07, 2011 10:17 pm
by Hagar Delest
n4rky wrote:1) instead of pointing to a query with lots of results all ending with a moderator comment to try this query, that moderator might actually point to some useful advice
There are some issues like this one when there are a lot of topics with most of them not solved. So the query shows the wide range of situations. If there had been an obvious fix then of course I would have pointed to it. Showing that there are a lot of users in the same situation shows that this is not an easy problem.
n4rky wrote:2) LibreOffice actually produced a meaningful error message.
Then stick to LibO.
n4rky wrote:it shouldn't be all that hard for a program to realize that for whatever reason, it can't write the file
Then propose the related code for that...

Re: Write Error. The file could not be written.

Posted: Sat Oct 08, 2011 12:03 pm
by Bill
Hagar Delest wrote:
n4rky wrote:2) LibreOffice actually produced a meaningful error message.
Then stick to LibO.
I think n4rky meant that LO doesn't produce a meaningful error message:
n4rky wrote:It would also help considerably if...2) LibreOffice actually produced a meaningful error message.

Re: Write Error. The file could not be written.

Posted: Sat Oct 08, 2011 12:21 pm
by Villeroy
Tools>Options>Paths...
Most of these paths[*] should point to some directory which is clearly in your home directory where you have full write access to anything.
[*] The templates path usually includes a path in the installation directory.

Re: Write Error. The file could not be written.

Posted: Sat Oct 22, 2011 3:10 am
by rmmnetwolf
When I faced the same problem, I solved it by moving all tabs into a brand new spreadsheet.

In my case it seemed a macro problem, maybe related to VB x Basic.

Anyway, the problem is gone now.

Re: Write Error. The file could not be written.

Posted: Mon Nov 07, 2011 8:00 pm
by Nearsited
Reduce the number of rows/worksheets.

Re: Write Error. The file could not be written.

Posted: Fri Nov 11, 2011 12:27 pm
by andrewufrank
i overcome this problem (when saving a file in latex format) by creating a new /tmp directory in my space and pointed libreoffice to it (options - path -tmp).
then it worked. it seems that this has something to do with the protection of the /tmp directory (which i did not want to explore further). perhaps somebody posts here what the permissions on /tmp should be and how to set them correctly.

Re: Write Error. The file could not be written.

Posted: Fri Nov 11, 2011 1:17 pm
by RoryOF
When a file cannot be written, it is often of use to navigate to one's Desktop or Home folder, where one has write permissions. If the file can be written there then the problem is possibly insufficient rights in the original target directory. In any case, if the file has been successfully written, no matter where, it is saved and the crisis has eased!

Re: Write Error. The file could not be written.

Posted: Thu Dec 01, 2011 3:10 am
by jackua
I have had this problem for years when left the office running for very long time. Today I found a hint on this forum that can explain the effect.
% cat /etc/cron.daily/tmpwatch
flags=-umc
/usr/sbin/tmpwatch "$flags" -x /tmp/.X11-unix -x /tmp/.XIM-unix \
-x /tmp/.font-unix -x /tmp/.ICE-unix -x /tmp/.Test-unix 240 /tmp
As I understand, this stuff will destroy all files in /tmp that were not accesses for 10 days. Exactly my case.
Unfortunately, the office cannot be recovered when this happens. I cannot save a file under different name. I have to kill/exit the program and restart.
I will update cron jobs and wait for a month or two to see if it helps.

Re: Write Error. The file could not be written.

Posted: Fri Dec 09, 2011 2:22 pm
by moises
Today I'm experiencing the same problem working with calc.

I was unable to save my work, even when trying to rename it. Since there were not too much changes I discarded them. Once reopened, I was able to save exactly (as far as I can tell) by saving after each change. Then, some minutes later without saving, II find the same response again. Some minutes later, I can observe that calc is trying to save continuously and I cannot access to the window (not even the menus) any more! I can concurrently run other instances of the application without problems.

I think the problem must be time related.

Re: Write Error. The file could not be written.

Posted: Wed Dec 21, 2011 10:23 am
by davex44
I found that by using task manager to end the process, the recover process in open office then allows you to save the original file intact.

Before doing this, create a backup file. Open a new open office file. Use ctrl-a, copy and paste to copy the contents of the original, save the new file, then close it before ending the task).

Re: Write Error. The file could not be written.

Posted: Fri Mar 16, 2012 6:11 am
by upandacross
This post seems to be part of an earlier thread. I am replying to it because I ran into this issue today. I was happily working on a not too complicated spreadsheet (originally created with Excel 2003) that has 5 subsheets with various links between them. Calc was working beautifully until I tried to save my work getting the error in question. I checked /var/log but didn't find anything. I did some Googling and, among other things tried:
  • renaming user directory to user.old and allowing OOo to recreate anew;
  • making permissions wide-open for all files and the directory;
  • saving to another name;
  • creating a fresh document, copy and paste, then saving the new file under a different name;
  • various unremarkable things including loud vocalizations.
Nothing seemed to make any difference and I had no way to save my work. :crazy:

Motivated to finally say goodbye to windoze, I persisted and here's what I found.

The file could be modified in a variety of ways and be resaved but some operations (making changes on one particular subsheet or goal seek or changing formulae on another) caused the file to become "unwriteable" (is that a word?).

However, here's the work around: save the file as a .xls Excel file and all is well. I can reliably make the offending changes in an ods version and cause the write to fail, then immediately save the same file unmodified as an xls and all is well. As a side note, I could also save the file as a template. Go figure. :ucrazy:

I will happly to turn on debug flags or whatever if some developer wants to work with me. As for sharing the spreadsheet, well, there is a little intellectual property thing we need to discuss. No big thing but it's how I make a living (such as it is)

Re: Write Error. The file could not be written.

Posted: Fri Mar 16, 2012 8:59 am
by Hagar Delest
Many thanks for the information. It would really help indeed if you've found a file that replicates the problem. Would you mind filing a bug report? See [Tutorial] Reporting bugs or suggestions.

As for the intellectual property, can you remove most of the content to keep only enough data to reproduce the bug?

Re: Write Error. The file could not be written.

Posted: Thu Jun 05, 2014 7:47 am
by spiders
sigh. I have a very large spreadsheet that does this... Its sitting at 38,876 rows and 6 different sheets with 4 different pivot tables. I've found its best to open a new document and save that which will usually kill off the busted auto-save in the large document, and then hand copy the data to the new document to get it to save.... not very elegant, but it does work. As far as I can tell, its the auto-save failing that causes this "could not be written" error. (for some reason, the auto save always tries to start up when I put several MB of text in the clipboard, not sure if this is related or not.)

Re: Write Error. The file could not be written.

Posted: Fri Dec 05, 2014 3:56 am
by PsiberMage
In case you all don't know it yet, this problem occurs with more than spreadsheets.

I am trying to either edit WORD V6.0 documents or read and convert documents saved by word 6.0

Every time and no matter what I do, I get

Error saving the document [docname]:
Write Error.
Error in writing sub-document styles.xml

I can't even figure out where that styles.xml is being stored.

This only started happening after the last upgrade ... before that everything worked fine. In fact I am having no problems with any existing spreadsheets (though I have yet to try an EXCEL sheet...).

This is an urgent issue because I have been successfully using OpenOffice for over 3 years.

This problem has our work in a loop of "[A]-> IS IT WORKING? -> HELL NO IT AIN'T WORKING YET!!! [GOTO A}"

In other words, I'm about to get my butt fired for suggesting this over MS OFFICE...