ArcGIS “invalid character in the given encoding” – Metadata Importer Issue : Solved?

ArcGIS has a beautiful way with words Error 999999 is my particular favourite message from ArcGIS:

This is a generic error for which the cause does not have a specific error ID.

However a recent error when running a script to import Metadata got me stumped, below is a brief description of the problem and the steps that seem to have fixed it.

Running the Metadata Importer got me this message:

Executing: MetadataImporter “LOCATION\FILE.MXD” “LOCATION\FILE.MXD”
Start Time: Wed Sep 11 14:49:37 2013
Unable to obtain IMetadata from: LOCATION\FILE.MXD ; Invalid character in the given encoding. Line 1, position 1.
Unable to obtain IMetadata from: LOCATION\FILE.MXD
Failed to execute (MetadataImporter).
Failed at Wed Sep 11 14:49:37 2013 (Elapsed Time: 0.00 seconds)

The fix:

I  couldn’t figure it out as I could see no other posts on the ArcGIS forums that described this problem.  Plenty of posts of the same message but no fixes other than through coding.   Some of the solutions talked about UNICODE issues, so I typed in “unicode and arcgis”, one of the links brought me to this post  and this image caught my eye:

(from ArcGIS forums)

What I did was change in ArcCatalog the table font to “Arial Unicode MS”.

I then went and selected the MXD with metadata I wanted to change and deleted the title and re-typed any text of a small length.

Then I ran the script again and it worked, no error messages and the metadat has now been imported.

Thoughts:  Is this a text formatting issue? I haven’t time to muck about looking into this but my hunch is that the metadata editor allows html formatting and somehow some hidden text formatting got in.  This would make sense as deleting the old title and retyping it again worked… hmmm

Thunderbird is a no go… Folder Pane empty – Solved! – Corrupt folderTree.json

Okay a specific post for those who use Thunderbird as an email client.   Basically I had some issues with my brand new PC where it BSOD (Blue Screen Of Death) almost immediately (turned out to be a loose fan in the tower!).   Upon fixing the PC I could open Thunderbird but not see any folders in the Folder Pane on the left.

So here’s the solution (I used the error console in Thunderbird to search for a possible solution):

  1. Navigate in Windows to the your Thunderbird profile folder (e.g. “C:\Users\YOURUSERNAME\AppData\Roaming\Thunderbird\Profiles\SOMETHINGHERE.default)
  2. Find the file “folderTree.json” back it up first and then delete it (or just rename it OLDfolderTree.json)
  3. Now load up Thunderbird, your problem should have been fixed (it seems to create a new file)!

SOURCES (this conservation helped me) : https://bugzilla.mozilla.org/show_bug.cgi?id=707329

 

CityEngine to SketchUp Keeping your Circles

I’ve been playing around with the export settings for placing models in SketchUp, but there has been a problem.   Basically, circular elements of my models are having their vertices merged so they look like they’ve been crushed:

Something is not right here....
That's better!

Turns out you just need to check the tickbox “Create Shape Groups” I don’t know why so if anyone knows just post a comment after this post…

Just check the box....

Solution: Very slow printer dialog boxes in Windows (network printers)

UPDATED 13th July 2010: This works for Windows 7 as well..

For sometime now I’ve had a problem printing over our small network, every time I would bring up the printer dialog box it would take an eternity to load up.   It became so bad I had almost given up on printing!

So after some looking around I came across the following solution, I know this works in Windows Vista 64bit and 32bit as well as XP (UPDATED: This works for Windows 7 64bit as well).   Apparently Windows doesn’t like it if you setup your printer by connecting to the printer and installing the driver whilst browsing your network…. (I don’t know why).   Anyway the solution is to add the printer as a local printer.

  1. Load up your printer browser in the control panel, in Vista
  2. I recommend deleting all your network printers and restarting your PC, it seems that windows holds on to some information until you restart.
  3. Click “Add a Printer”.
  4. Now select add local printer.
  5. Create new port.
  6. When it asks for Enter a port name use the following format “\\networklocation\yourprinter”, essentially it’s address on the network.
  7. Follow the steps to install the printer driver again, if you have installed the printer before windows should still retain that printer driver you used.
  8. Now repeat for any of the other printers you have.

This technique worked for me and my computer is now a dream to print from!  If you have any trouble with these instructions just let me know.

PhotoShop: Unknown or invalid JPEG marker type…

Okay I’ve just come across this curious message when trying to open what should be a perfect JPEG image in Photoshop :

“Could not complete your request because an unknown or invalid JPEG marher type is found.”

I checked the file again by using Windows Paint to open the same image and got no error message it just works…

So how did I get there and how is it resolved?  Well it starts in Adobe Acrobat with me saving one of the pages as a JPEG…. but I noticed when looking at this problem that instead of the progress bar saying “Saving as JPG” it says “Saving as PNG”! 

 Ah ha, but the file extension is still saying it is a jpg…..

To open your images you need to rename the files extension* as a PNG file, then PhotoShop can open it without complaint.   I guess ‘Paint’ is not as picky about its file extensions as a big professional photo editor such as adobe… Still this is a potentially very annoying bug…


If anyone else has any insight into this issue or more suggestions please leave a comment on this article!

*you may need to change some settings in the Folder Options dialog found in the Control Panel, Click the view tab and then uncheck the tick box “Hide extensions for known file types” now you can rename your files extension type easily.

ArcGIS : One or more layers failed to draw.

One or more layers failed to draw.

Labelling is very important in map making which is and I occasionally see this error message, now I won’t pretend to know exactly what is going on.   This error message (without any detail) happens to me when I have used a layer and have opted to label each feature differently (through an SQL query).   I think it happens when you relocate a database or MXD file and somehow the SQL query breaks. – I’d appreciate any insight into this if you have any…

The solution is simple:

  1. Right-click and select properties on your labelled layer (this isn’t an Annotation issue)
  2. Now click on the Labels tab.
  3. Click on the “Get Symbol Classes” and say Yes to overwriting the previous classes.
  4. Now click on the SQL Query button.
  5. In the SQL query dialog box delete the old query and redo the query again.
  6. Your features should now be labelled properly, Click Apply and then OK

Related: ArcGIS Support fourm 22547

    ArcGIS – Cannot map metafile into memory. Not enough memory

    Well this little error message really annoys me, I’ve just finished a large map (often A1) and all I want to do is print or export it (jpg or pdf). 

    Often I find it better to export as a pdf so I don’t need to load up ArcGIS again just to print a copy off.

    Anyway as my maps get bigger (and hopefully better) so to do I see this error message more often.

    The worst thing is the solution, basically I have to reboot my computer and as soon its loaded and before I do anything else load my map up in ArcGIS and either print or export it.  It’s also a one shot deal so once I’ve done this I can’t re-printexport without a reboot.

    I’ve followed a thread on the ESRI support site (great for support issues, but a bit hard to navigate), you can find it here : http://forums.esri.com/Thread.asp?c=93&f=1731&t=248490

    The thread has been going since the 9th March 2008, and the last post as of now was the 30th March.   Many solutions posted talk about editing the registry (or doing a reboot), and ESRI has said that the last service update should have fixed some peoples problems (but not mine apparently).

    My feeling is that editing the registry manually should not be considered a solution (couldn’t someone write a small program to do it for me safely??).

    Anyway I hope you didn’t come here to find the solution as the thread I link to in the support forum is all I’ve got, people have solved it for themselves but I guess it depends what you do for mapping.

    Leave a comment or message me (I’m on Twitter you know..) if you have any solutions I might try, and no I don’t want to edit the registry OR reboot!