7 Replies Latest reply on Feb 6, 2012 12:54 PM by RonCates

    Export Error

    RonCates

      Title

      Export Error

      Post

       I have a set of scripts set up to dump all the data and images from our database as an off site backup. Along with creating .csv files it also exports associated pictures. The script works great except for an occasional .csv file or image not being able to be created. If i rerun the script over and over again it's almost never the same image or file that fails. The error is

      "Header.jpg cannot be created on this disk. Use a different name, make more room on the disk, unlock it or use a different disk."

      It's the same error you would get if the file path was incorrect. But in this case, the file paths are correct and as i said, it happens at different points and on different records each time.

      I get the sense that it's like the script is going too fast and at certain points it stumbles on an export because it's getting ahead of it's self or something. Although I realise that sounds pretty implausible. I was also originally running it straight to a usb hard drive so I tried switching to my local drive in case the usb connection was slow or something. But it does the same thing. Although it seems it may happen fewer times on the local drive.

      So, any ideas why this is happenning?

      And does anyone know the error code to trap for so i can throw up a dialog to display the possibly offending file path?

       

      Thanks

        • 1. Re: Export Error
          philmodjunk

          Due to a bug in FileMaker, you cannot use Set Error Capture to suppress this error dialog.

          The apparently random pattern to the error makes this especially odd. Care to post your script? Maybe someone else can spot something you missed and even if not, it will provide a fuller picture of the issue.

          • 2. Re: Export Error
            RonCates

             Thanks Phil. I was just getting into the script to try and capture the error, but I realised I had error capture on and was already trapping for errors. So I guess that explains it. I wanted to add the dialog to display the path but if I can't capture the error i supose I will have to run through it with the dialog active and have it popup on each loop reguardless. There are about 300 records in the table the error occurs on, so i guess it's doable although tedious. I wonder though if it will even happen if the script isn't running through at full speed? I'll let you know and if I can't figure anything out with that approach I'll post the script.

            • 3. Re: Export Error
              RonCates

               Strike that. I can't surpress the dialog but I can still trigger my dialog. It's error 800. So testing is underway :)

              • 4. Re: Export Error
                RonCates

                 OK, here are the results of my test.

                 

                First Run

                7 header jpgs failed of 184

                2 thankyou jpgs failed of 184

                 

                Second Run

                1 .csv file failed

                12 header jpgs failed of 184

                 

                Of the 9 files that failed the first run and the 13 that failed the second, only 1 file failed in both runs. All the others were different from one run to the next, confirming that it is random files each time with nothing in common.

                The most common failures are the header jpg files which are generally around 1 MB

                One clue I have noticed is the fact that each Job being exported has many invoices with line items that hold images of artwork. For each job exported all the associated artwork is exported as well and at this point i have not seen any of these images fail, and there are thousands of them being exported.

                However, I have another batch export script that exports all line item images for a selected job. Usually a couple hundred at a time up to at most 1000. Only on Occasion, one of these images will fail to export in the same way and I end up going in and manually exporting the one that failed.

                Most of the images from the lines table are only a few hundred MB but there are over 300 in the export i'm working with today that are over 1 MB. So I guess it's not the size.

                 

                I am not sure how I can post my script. I use to have the ability to print to Pdf on my other computer. But I don't on this one.

                • 5. Re: Export Error
                  philmodjunk

                  Hmm, given the apparently random failures, I check out the hard drive, user account permissions and also run a recover on the file to see if any issues are reported by the recover process. I'd then test a recovered copy to see if I got any differences in behavior even if it did not report any issues.

                  To post a script to the forum:

                  1. You can upload a screen shot of your script by using the Upload an Image controls located just below Post A Answer.
                  2. You can print a script to a PDF, open the PDF and then select and copy the script as text from the opened PDF to your clipboard for pasting here.
                  3. If You have FileMaker advanced, you can generate a database design report and copy the script as text from there.
                  4. If you paste a text form of the script, you can use the Script Pretty box in the Known Bugs List database to paste a version that is single spaced and indented for a more professional and easier to read format. (Use the HTML option on the database tab panel and paste the text into the forum's HTML editor.)
                  • 6. Re: Export Error
                    RonCates

                     Another odd turn. While running this export over and over again Filemaker finally froze in the middle of a run. I had to use Task Manager to force quit. I reopenned the database and every subsiquent run of the export script has completed successfully with no failed files.

                    This script has actually been failing a few file exports everytime I run it since I wrote it a year and a half ago. I have always just manually exported the failed files afterwards since it was often just 2 or 3 files. I started digging into it today because so many more were failing this time. Now after the force quit it's not failing at all. I'm on the third run now with no errors.

                     

                    Huh?

                    • 7. Re: Export Error
                      RonCates

                       Thanks Phil. I'll try running recover and see what the results are. I'll try to get the script posted. It will probably be tomorrow.