Your best friend for file transfer.

Fetch application logoFetch

"edit" button gives error "a file was not found" (10 posts)

  • Started 13 years ago by Stella
  • Latest reply 12 years ago from Macey
  • Stella Member

    I have a file on my website that I recently changed to a newer version of the same file. I did this by downloading the relevant contents of a test folder I had been working in, and then uploading them again to the main directory.

    Now whenever I click on this ONE file I get the error "fetch could not edit colours.php because a file was not found"

    At first I thought something went wrong with the upload (it needed to over-write an existing, earlier version of the same file with the same name - THIS WAS THE *ONLY* SUCH FILE)

    I tried again and to make sure I have *deleted* the existing file first, I have hit "refresh" etc. A few times.

    The file is there and seems fine and works fine. I can "GET" the file and edit it and re-upload it FINE FINE FINE.

    When Fetch first responds to the edit request it says "downloading *589* of *568* bytes" and then says "download complete" but then switches to "downloading 0 of 568 bytes"* and then the error message pops up,

    *[EDIT: maybe it says this before it says download complete, don't know. Tried too many times already to do it again just now but I will if it's important]

    In the file list it shows as 568 bytes.

    I had to try several times to read how many bytes it says it is downloading but note IT DOESN'T MATCH THE SIZE OF THE FILE.

    Nothing turns up in my editor (coda) even though it says it has finished downloading.

    WTF?

    PS: JUST CHECKED FILE INFO ON MAC AND IT SAYS 534 BYTES I THOUGHT FETCH SAID THAT EARLIER SO ITS NOT MY IMAGINATION. IS FETCH MAKING UP RANDOM FILE SIZES OR ADDING THINGS ON WHEN I TRY EDITING?

    This makes me feel like I am going mad.

    Posted 13 years ago #

  • Scott McGuire Administrator

    Hi,

    First, regarding the sizes reported by Fetch - Fetch is not just making up numbers; the changing sizes you see are a result of how the FTP protocol handles transfers of text files, and you shouldn't worry about it.

    There are three different ways a line ending (line break) can be denoted in a text file: either by just a linefeed (LF), just a carriage return (CR), or a carriage return plus a linefeed (CRLF).

    When a file is transferred via FTP in text mode, the way the transfer is done is:

    * The FTP server translates the line endings of the file from the server's line ending style to CRLF;
    * The file is transferred;
    * And the FTP client then translates the line endings from CRLF to the client's desired line ending style.

    If the server uses either just a carriage return or line feed, but not both, for line endings, the file will get larger when it's transferred, because the line endings all go from one character to two characters when the file is transmitted. That's why Fetch says it transferred more bytes than the file's original size; it quite literally did transfer more bytes. But then if the client also only uses just a carriage return or line feed for line endings, then the line endings all go back to being one character again - resulting in a file that is the same size as on the server.

    Unix uses just a carriage return to indicate a line ending. So seeing the transferred size of a text file be larger than the actual file size, but ending up with a file the same size as on the server, is normal if you're transferring from a Unix server (the most common kind) to the Mac (also Unix).

    (You can change the style of line endings that Fetch will convert text files to, but you probably don't want to. And you can avoid line ending translation altogether by transferring text files in binary mode.)

    Second, regarding your real problem - that you get an error when you try to edit that one particular file. We'd like some more information to help figure out what's going on.

    Could you please do the following?

    * Quit Fetch, if it's running.
    * Open Fetch again.
    * Connect to your server.
    * Try editing the problem file again.
    * After you receive the error, go to the Window menu, and choose Fetch Transcript.
    * Copy the entire contents of the transcript window, and paste them into a reply to this message.

    We'll take a look and try to advise further.

    Thanks,

    Scott McGuire
    Fetch Softworks

    Posted 13 years ago #

  • Stella Member

    Hi thanks. Your explanation of the numbers was illuminating.

    I tried what you said, and it didn't work but when I looked at the transcript it was huge as it obviously hadn't cleared after I closed the fetch window before. I saved it anyway and restarted fetch - and tried again and it was fine.

    From my point of view that just makes it "weird glitchy thing" but just in case it's something you might want to look into I uploaded the text file of the log to my server. It's at http://www.thecybertramp.com/stuff/FetchTranscript.txt

    It's 1.6mb. Not ginormous but far too big to copy and paste.

    Thanks for the trouble, if it happens again (esp. often) I will be back, but for now I'm happy. I expect it was something to do with over-writing the old file (?). I have noticed sometimes when I change files (deleting? can't remember) they stay firmly put on the file list and I have even had to quit fetch and start again to get the list right. I can't even remember why it mattered so much at the time, but there must have been some reason. Related, maybe? Anyway I just assumed that sometimes you need to restart fetch for changes to be visible.

    Thanks again.

    Posted 13 years ago #

  • Scott McGuire Administrator

    Hi,

    I'm glad to hear the problem has been solved now; it may have been some temporary server glitch.

    Thanks for putting up the transcript; I took a look and it isn't immediately obvious what was going on; if the problem was still happening, I'd ask you to try some more things, but since it isn't, I won't. But if it happens again, let us know.

    Regarding your file lists in Fetch sometimes not being up to date: Fetch sometimes caches (stores) file lists locally in order to speed up their display. While it is designed to notice changes to file lists and get a fresh list when there are changes, on rare occasions the algorithm Fetch uses makes a mistake and shows you an out-of-date file list, which may not include all your files and folders (or include ones that are no longer there). My guess is this what is happening to you.

    When this happens, you can tell Fetch to get an up to date file list from the server by going to the View menu and choosing Refresh. The file list should be correct after you do that.

    Or, since you say you encounter this problem regularly, you might want to just turn off the file list caching feature, so that Fetch always gets a fresh file list from the server every time. You can turn it off by doing the following:

    * Open Fetch.
    * Go to the Fetch menu, and choose Preferences.
    * Click the Miscellaneous tab.
    * Click the "Ignore file list cache" checkbox to put a check next to it.
    * Close the Preferences window.

    Please let us know if refresh/turning off the file cache doesn't solve the problem of out of date file lists, or if you have further questions.

    Thanks,

    Scott McGuire
    Fetch Softworks

    Posted 13 years ago #

  • Stella Member

    Aha I will try that. Thanks for the tip. It doesn't happen all the time, but often enough so I thought it was just like that!

    Posted 13 years ago #

  • Jeff Member

    I just had the same thing happen. Restarting fetch did the trick to fix it.

    Posted 12 years ago #

  • exoboy Member

    I also had the same problem. I changed the preference and it did nothing, but after restarting, it seemed to go away.

    I was trying to access an .htaccess file, and it was the only file have this problem... WEIRD!

    Thanks for this thread!

    Posted 12 years ago #

  • Macey Member

    Hello,

    I am experiencing the same file error message as Stella. When I try to open a file that I previously could open just fine, I get the following drop down error in Fetch: "Fetch could not edit "index.php" because a file was not found". I can see the file when I click on "web view" and it's live on my website, so I know it's there. I have tried restarting Fetch and it does not help. I have a large website and the error message has been randomly popping up on various files for the past week. Sometimes the message will be gone when I go back to some of the files the next day. As you suggested to Stella, I copied the Fetch Transcript (at least the last part that seemed to pertain to my problem). Here is the code:

    Successful download of index.php as text file (8,493 bytes, 0 bytes/sec, 0:00 elapsed) completed at 1/18/12 7:45 PM
    Fetch could not edit “index.php” because a file was not found. ()
    opening downloaded file to edit: 2,-43 (state == EDIT_RETRIEVING)
    PWD
    257 "/var/www/html/rivers_we_float/snake_river_through_hells_canyon" is current directory.
    PWD
    257 "/var/www/html/rivers_we_float/snake_river_through_hells_canyon" is current directory.
    PWD
    257 "/var/www/html/rivers_we_float/snake_river_through_hells_canyon" is current directory.
    MDTM index.php
    213 20120114093339
    SIZE index.php
    550 SIZE: Operation not permitted
    PASV
    227 Entering Passive Mode (209,151,25,56,130,75).
    Making data connection to 209.151.25.56 port 33355
    RETR index.php
    150 Opening ASCII mode data connection for index.php (8348 bytes)
    226 Transfer complete.
    Successful download of index.php as text file (8,493 bytes, 0 bytes/sec, 0:00 elapsed) completed at 1/18/12 7:48 PM
    Fetch could not edit “index.php” because a file was not found. ()
    opening downloaded file to edit: 2,-43 (state == EDIT_RETRIEVING)

    Any thoughts???

    Posted 12 years ago #

  • Jim Matthews Administrator

    Hi Macey,

    Thanks for reporting this problem. My first suggestion would be to restart your Mac. If that does not help, could you let us know what version of Mac OS X and Fetch you are running?

    Thanks,

    Jim Matthews
    Fetch Softworks

    Posted 12 years ago #

  • Macey Member

    Hello Jim,

    Thank you so much for your prompt reply. I restarted my Mac and it's working fine now- fantastic!! FYI, my Mac is a MacBook Pro running the OS X, version 10.6.8 operating system and the version of Fetch is 5.7.

    I will let you know if the problem comes back.

    Cheers,
    Macey

    Posted 12 years ago #

Reply

  • Or nickname, if you prefer.
  • This will be kept confidential.
  • This is to ensure that you’re a person, not a spambot.