Error: Invalid Characters

I can't sync because I supposedly have a file with invalid characters. However, the file does not even come up in my library when I search for it.

Using newest Zotero update on Firefox 3.6.16, on Mac OS X 10.6.7.
  • Can you create a report ID? Also, are you sure that the file isn't in the trash?
  • Thanks!
    File was indeed in the trash. So I emptied the trash and tried to sync. Once again, an error message about invalid characters pertaining to a file not in my library came up. This one isn't in the trash, either.

    My error report ID is: 1844448799
  • I get this as well, and no, the file is not there.

    ID: 1380321609
  • edited April 24, 2011
    Whether or not the file exists on the disk, the file path exists in the database. Find the attachment item in question in Zotero and relink or delete it.

    And if you can tell us where the item in question came from (e.g., import via RIS, import from a particular site), that would be helpful.
  • edited May 13, 2011
    I fixed this using this method ...

    WARNING THIS METHOD IS NOT FULLY TESTED. MAKE A BACKUP.

    YOU WILL LOSE PATHS TO ATTACHMENTS AND SNAPSHOTS

    However the titles/names of the attachments and snapshots will be maintained.

    (Note to SQL coders - a better command could probably selectively delete only file paths and leave attachments alone)

    1. Install SQLite Manager addon for Firefox.

    2. Disable Zotero.

    3. Backup entire Zotero directory.

    4. Connect to "zotero.sqlite" using SQLite Manager.

    5. Run check integrity test on entire database.

    6. Select the itemAttachments table.

    7. Execute this SQL command ... UPDATE "itemAttachments" SET "path" = "";

    Path column of itemAttachments should now be empty of nasty file path characters.

    8. Run all the commands at the bottom of this page ... https://zotero.org/utils/dbfix/manual ... you might have to cut and paste a little as one of them gives an error. But this appears to be a necessary step as I was getting a DB error before I did this step and could not sync.

    9. Close SQLite Manager.

    10. Remove any journal or bak sqlite database files in the Zotero directory (otherwise I think SQLite repairs what you've done from the journal).

    11. Re-enable Zotero and now you should get a clean sync. Just did this myself and all my references are now there on the public web page of my references on the Zotero site. You might have to put your password back in.

    The bad characters were originally introduced by a buggy mount of an SD card on my machine (in the path). Although I guess there may be other ways that bad characters can get in there.
  • I wasn't suggesting that you needed to modify the database itself and remove all your paths—just that, whether or not the file existed on disk, the attachment item was still in your Zotero library. Deleting it and emptying the trash would have fixed this.

    Needless to say, the above method is not recommended.

    Glad to hear sync is working again for you, though.
  • I'm sorry. I should have explained better. My problem was not fixed by simply deleting the item in Zotero. This left me with items unsynched that were up to four months old. I eventually had to take drastic measures or risk losing my references. I have put appropriate warnings on the method. I have coded in SQL before so I understand what this does, plus I have been using my fixed database for a couple of days now with no problems.
  • I have a variant on this problem
    What comes up is
    The filename '‹c et al. - 2010 - lq¾½:MºÊvøsvðÄ.do' contains invalid characters.

    I can't find any record that even looks like this!
    Any suggestions (apart from deleting all the 2010 records)?

    Best wishes,
    Anthony Staines
  • you could try for ".do" or for "et al. - 2010" neither of which should be very common.
    Again, we'd want to know where that item - a Stata .do file? - came from.
Sign In or Register to comment.