Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when extracting OSRM file #466

Closed
Cedrick84 opened this issue Oct 3, 2012 · 7 comments
Closed

Error when extracting OSRM file #466

Cedrick84 opened this issue Oct 3, 2012 · 7 comments
Milestone

Comments

@Cedrick84
Copy link

When doing /osrm-extract on a clean build (ubuntu) I get the following error:

[error extractor.cpp:146] cannot open profile.lua: No such file or directory occured in scripting block

I got it extracting by copying car.lua (and others) from the profiles dir to the main dir and renaming car to profile.lua.

It appears to be looking for profile.lua which is deleted after scons

@emiltin
Copy link
Contributor

emiltin commented Oct 3, 2012

you should have a 'profile.lua' symlink in the root folder, pointing to profiles/car.lua:
https://github.com/DennisOSRM/Project-OSRM

@Gustry
Copy link

Gustry commented Jul 1, 2013

I tried to upgrade to 0.3.4 this morning.
Compilation seems to be ok.
However, I have this issue :
./osrm-extract ../DATAS/cameroon-latest.osm.pbf
[i /home/etienne/Documents/Compilation/Project-OSRM/Extractor/ScriptingEnvironment.cpp:25] Using script profile.lua
[! [! /home/etienne/Documents/Compilation/Project-OSRM/Extractor/ScriptingEnvironment.cpp:95] cannot open profile.lua: No such file or directory occured in scripting block
[! /home/etienne/Documents/Compilation/Project-OSRM/Extractor/ScriptingEnvironment.cpp:95] cannot open profile.lua: No such file or directory occured in scripting block

I tried to copy/paste foot.lua and rename it :
./osrm-extract ../DATAS/cameroon-latest.osm.pbf
[i /home/etienne/Documents/Compilation/Project-OSRM/Extractor/ScriptingEnvironment.cpp:25] Using script profile.lua
[? /home/etienne/Documents/Compilation/Project-OSRM/Util/InputFileUtil.h:32] Failed to open file extractor.ini for reading.
[i /home/etienne/Documents/Compilation/Project-OSRM/extractor.cpp:62] extracting data from input file ../DATAS/cameroon-latest.osm.pbf
[STXXL-MSG] STXXL v1.3.1 (release)
[STXXL-ERRMSG] Warning: no config file found.
[STXXL-ERRMSG] Using default disk configuration.
[STXXL-MSG] 1 disks are allocated, total space: 1000 MiB
[i /home/etienne/Documents/Compilation/Project-OSRM/Extractor/BaseParser.cpp:40] Ignoring turn restrictions
[i /home/etienne/Documents/Compilation/Project-OSRM/Extractor/BaseParser.cpp:53] Found 1 exceptions to turn restriction
[i /home/etienne/Documents/Compilation/Project-OSRM/Extractor/BaseParser.cpp:55] foot
[i /home/etienne/Documents/Compilation/Project-OSRM/extractor.cpp:108] Parsing in progress..
-- profile.lua:133: attempt to perform arithmetic on global 'numberOfNodesInWay' (a nil value)
[! /home/etienne/Documents/Compilation/Project-OSRM/Extractor/BaseParser.cpp:93] lua runtime error
[STXXL-ERRMSG] Removing disk file created from default configuration: /var/tmp/stxxl

I tried car.lua too :
./osrm-extract ../DATAS/cameroon-latest.osm.pbf
[i /home/etienne/Documents/Compilation/Project-OSRM/Extractor/ScriptingEnvironment.cpp:25] Using script profile.lua
[! /home/etienne/Documents/Compilation/Project-OSRM/Extractor/ScriptingEnvironment.cpp:95] profile.lua:2: module 'lib/access' not found:
no field package.preload['lib/access']
no file '/lib/access.lua'
no file 'profiles/lib/access.lua'
no file './lib/access.lua'
no file '/usr/local/share/lua/5.1/lib/access.lua'
no file '/usr/local/share/lua/5.1/lib/access/init.lua'
no file '/usr/local/lib/lua/5.1/lib/access.lua'
no file '/usr/local/lib/lua/5.1/lib/access/init.lua'
no file '/usr/share/lua/5.1/lib/access.lua'
no file '/usr/share/lua/5.1/lib/access/init.lua'
no file './lib/access.so'
no file '/usr/local/lib/lua/5.1/lib/access.so'
no file '/usr/lib/i386-linux-gnu/lua/5.1/lib/access.so'
no file '/usr/lib/lua/5.1/lib/access.so'
no file '/usr/local/lib/lua/5.1/loadall.so' occured in scripting block

@ikks
Copy link

ikks commented Jul 1, 2013

I'm on Debian Wheezy(64 bits) with changeset 828b370 from master and with a symlink to car.lua I'm getting the same error of 'lib/access' not found.

[i /tmp/Project-OSRM/Extractor/ScriptingEnvironment.cpp:25] Using script profile.lua
[! /tmp/Project-OSRM/Extractor/ScriptingEnvironment.cpp:95] profile.lua:2: module 'lib/access' not found:
        no field package.preload['lib/access']
        no file '/lib/access.lua'
        no file 'profiles/lib/access.lua'
        no file './lib/access.lua'
        no file '/usr/local/share/lua/5.1/lib/access.lua'
        no file '/usr/local/share/lua/5.1/lib/access/init.lua'
        no file '/usr/local/lib/lua/5.1/lib/access.lua'
        no file '/usr/local/lib/lua/5.1/lib/access/init.lua'
        no file '/usr/share/lua/5.1/lib/access.lua'
        no file '/usr/share/lua/5.1/lib/access/init.lua'
        no file './lib/access.so'
        no file '/usr/local/lib/lua/5.1/lib/access.so'
        no file '/usr/lib/x86_64-linux-gnu/lua/5.1/lib/access.so'
        no file '/usr/lib/lua/5.1/lib/access.so'
        no file '/usr/local/lib/lua/5.1/loadall.so' occured in scripting block
[! /tmp/Project-OSRM/Extractor/ScriptingEnvironment.cpp:95] profile.lua:2: module 'lib/access' not found:
        no field package.preload['lib/access']
        no file '/lib/access.lua'
        no file 'profiles/lib/access.lua'
        no file './lib/access.lua'
        no file '/usr/local/share/lua/5.1/lib/access.lua'
        no file '/usr/local/share/lua/5.1/lib/access/init.lua'
        no file '/usr/local/lib/lua/5.1/lib/access.lua'
        no file '/usr/local/lib/lua/5.1/lib/access/init.lua'
        no file '/usr/share/lua/5.1/lib/access.lua'
        no file '/usr/share/lua/5.1/lib/access/init.lua'
        no file './lib/access.so'
        no file '/usr/local/lib/lua/5.1/lib/access.so'
        no file '/usr/lib/x86_64-linux-gnu/lua/5.1/lib/access.so'
        no file '/usr/lib/lua/5.1/lib/access.so'
        no file '/usr/local/lib/lua/5.1/loadall.so' occured in scripting block

@emiltin
Copy link
Contributor

emiltin commented Jul 1, 2013

lib/access.lua is located in osrm_root/profiles/lib/access.lua.
the reason you're getting the error is probably because you're using a symlink. The search is performed relative to the main lua file.

@ikks
Copy link

ikks commented Jul 1, 2013

Thx @emiltin !!! I made also a symlink to the lib and it started to work properly, I wouldn't expect it to be that way, but it works now.

ln -s ../profiles/lib/

If I copied the car.lua to default.lua I got the same error.

@DennisOSRM
Copy link
Collaborator

Oh, the link has been deleted from the git repository by accident. Will re-add it soon

@seanknox
Copy link

FYI: I had the same issue with the ../profiles/lib symlink being missing. Once I added that osrm-extract would run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants