Skip to content

Cannot start Tilemill 0.9.1 in Windows Vista, unable to load share library #1540

Closed
cplanicka opened this Issue Jun 27, 2012 · 16 comments

2 participants

@cplanicka

Hi all, it looks like others have had problems with running TileMill on Windows 7 (64bit), but I am running Tilemill 0.9.1 on Windows Vista and having similar error messages. I think my answer is probably buried within their responses, but being a nube I was hoping someone could walk me through how to fix the following issue when I open the program (either normally or when I run as Admin, same response):

node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: Unable to load shared library C:\Program Files\TileMill\node_modules\mapnik\lib_mapnik.node
at Object..node (module.js:463:11)
at Module.load (module.js:351:31)
at Function._load (module.js:310:12)
at Module.require (module.js:357:17)
at require (module.js:368:17)
at Object. (C:\Program Files\TileMill\node_modules\mapnik\lib\mapnik.js:3:14)
at Module._compile (module.js:432:26)
at Object..js (module.js:450:10)
at Module.load (module.js:351:31)
at Function._load (module.js:310:12)

Thanks in advance,
Chris

@springmeyer
Mapbox member

Do you have Mapnik installed separately perhaps, or perhaps the HOTOSM installer?

@springmeyer
Mapbox member

If you happen to have python installed can you do this:

python -c "import ctypes;print ctypes.CDLL('C:\\Program Files\\TileMill\\node_modules\\mapnik\\lib_mapnik.node')"

Let me know here the error you get.

@cplanicka

Thanks for the response. I just installed it normally from the downloaded installer (no changes made), so I don't think I installed Mapnik separately? As you probably guessed, I am new to a lot of this, so I just downloaded python but am getting syntax errors when I try to run the command you put in (particularly the second "ctypes" part with the .CDLL )

I tried reinstalling TileMill a few times, and now get the (similar) error message of:
node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: Unable to load shared library C:\Program Files\TileMill\tilemill\addons\mapnik\lib_mapnik.node
at Object..node (module.js:472:11)
at Module.load (module.js:348:31)
at Function._load (module.js:308:12)
at Module.require (module.js:354:17)
at require (module.js:370:17)
at Object. (C:\Program Files\TileMill\tilemill\addons\mapnik\lib\mapnik.js:3:14)
at Module._compile (module.js:441:26)
at Object..js (module.js:459:10)
at Module.load (module.js:348:31)
at Function._load (module.js:308:12)

@springmeyer
Mapbox member

Hmm, looking more at this error. It looks like the first error was coming from TileMill 0.9.0, while the second error is coming from TileMill 0.9.1. In both cases it appears that you have either installed TileMill to a slightly customized location (or that the installer on Windows Vista behaves slightly different). What I mean by that is that I think TileMill 0.9.1 should be going into C:/Program Files/TileMill-v0.9.1/... not C:/Program Files/TileMill/.....

Anyway, what we need to do to figure out the problem is 4 things:

1) Manually uninstall all traces of TileMill, both 0.9.0 and 0.9.1, by looking for any TileMill directories in C:/Program Files or C:/Program Files (x86). Also delete any start menu items related to TileMill.

2) Re-install TileMill 0.9.1, and do not make any customizations during the install to where TileMill is installed. Confirm with me when you respond about whether in the past you have made any customizations during the install steps

3) Then try running TileMill 0.9.1 again. You will likely get the same error in the Logs.

4) Then try running the python command I gave you, and report back any syntax errors and I will help you get the python command working. Running the python command will not fix anything in TileMill but is the only way we can get the info necessary to know what might be wrong.

The command that will likely work is:

python -c "import ctypes;ctypes.CDLL('C:/Program Files (x86)/TileMill-v0.9.1/tilemill/addons/mapnik/lib/_mapnik.node')"

or:

python -c "import ctypes;ctypes.CDLL('C:/Program Files/TileMill-v0.9.1/tilemill/addons/mapnik/lib/_mapnik.node')"
@cplanicka

Thank you for taking the time to walk me through this! I had altered the folder name originally. I now have reinstalled, completely without customization. The error I get when running the (second) command in Python IDLE:

import ctypes;ctypes.CDLL('C:/Program Files/TileMill-v0.9.1/tilemill/addons/mapnik/lib/mapnik.node')
Traceback (most recent call last):
File "", line 1, in
import ctypes;ctypes.CDLL('C:/Program Files/TileMill-v0.9.1/tilemill/addons/mapnik/lib/mapnik.node')
File "C:\Python32\lib\ctypes__init
.py", line 353, in init
self._handle = _dlopen(self._name, mode)
WindowsError: [Error 126] The specified module could not be found

and directly in Python (command line), I get the error message "This application has failed to start because mapnik.dll was not found. Re-installing the application may fix the problem." and then
File "", line 1, in
File "C:\Python32\lib\ctypes__init__.py", line 353, in init
self._handle = _dlopen(self._name, mode)
WindowsError: [Error 126] The specified module could not be found

I am not sure if this is what you were looking for... but I hope it helps! Again, I appreciate the assistance.

@springmeyer
Mapbox member

Okay, that new path for the install looks better. So, TileMill is still not working, right? (RE: Step #3 above). RE: Step #4, it looks like the python command did not work properly because the actual mapnik.node was not found. In other words I guessed the wrong path based on your install (or something was mistyped).

You can either hunt down the exact path to the .node file in your find (then copy the path to form up the python command correctly), or we take take a different route and try using the depends.exe program to troubleshoot the problem. If you want to try that route see my instructions at #1229 (comment)

@cplanicka
@springmeyer
Mapbox member

I'll need you to take a screenshot, upload it somewhere and then link to it here, as github does not allow attached docs.

@springmeyer
Mapbox member

that is what I was hoping to see. However, unfortunately it does not provide any more clues. So, we're back to needing to get the python command to run.

@springmeyer
Mapbox member

So, this is what I get when I run the python command. I expect an error to show up in a windows popup:

I need you to try to get the path correct in the python command - focus - focus - focus, to the _mapnik.node module. If you get the error The specified module could not be found that means you have typed the path incorrectly.

@springmeyer
Mapbox member

ping @cplanicka

@cplanicka
@springmeyer
Mapbox member

Can you try that again, but first switch all the backslashes (\) to forward slashes (/) in the python command.

@cplanicka
@springmeyer
Mapbox member

the likely cause for this was a conflicting library, either mapnik.dll or a depedency. This has not been reported recently, so closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.