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

Bugfix - using scripts from a different directory #1

Merged
merged 2 commits into from Mar 4, 2013

Conversation

Projects
None yet
2 participants
@rkday
Contributor

rkday commented Mar 3, 2013

I'm using ostn02python as part of a larger project, and I've found that scripts fail when the ostn02python.txt.bz2 file isn't in the current directory (example below). This patch fixes that.

rob@rivertam:~$ python ostn02python/example.py 
Traceback (most recent call last):
  File "ostn02python/example.py", line 12, in <module>
    from OSTN02 import *
  File "/home/rob/ostn02python/OSTN02.py", line 32, in <module>
    ostn_data = ostn() # load all the data from below
  File "/home/rob/ostn02python/OSTN02.py", line 21, in ostn
    fi = bz2.BZ2File("ostn02data.txt.bz2")
IOError: [Errno 2] No such file or directory: 'ostn02data.txt.bz2'
@TimSC

This comment has been minimized.

Show comment
Hide comment
@TimSC

TimSC Mar 4, 2013

Owner

Thanks for that! What kind of project are you using it for?

Owner

TimSC commented Mar 4, 2013

Thanks for that! What kind of project are you using it for?

TimSC added a commit that referenced this pull request Mar 4, 2013

Merge pull request #1 from rkd91/master
Bugfix - using scripts from a different directory

@TimSC TimSC merged commit 71f1ff3 into TimSC:master Mar 4, 2013

@rkday

This comment has been minimized.

Show comment
Hide comment
@rkday

rkday Mar 5, 2013

Contributor

It's https://github.com/rkd91/wherearewe (or http://www.wherearewe.org.uk) - I'm using ostn02python to process the Ordnance Survey postcode data (given as a grid reference) into something that OpenLayers can comprehend.

Contributor

rkday commented Mar 5, 2013

It's https://github.com/rkd91/wherearewe (or http://www.wherearewe.org.uk) - I'm using ostn02python to process the Ordnance Survey postcode data (given as a grid reference) into something that OpenLayers can comprehend.

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