<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi,<div><br></div><div>I have some python code that runs fine if I execute it from the terminal. If I run it from within textmat (cmd-R) I get this error:</div><div><br></div><div><span class="Apple-style-span" style="font-family: 'Trebuchet MS'; font-size: 13px; "><div id="exception_report" class="framed"><p id="exception" style="margin-top: 0px; "><strong style="margin-top: 0px; color: rgb(228, 69, 11); ">IOError:</strong> 2, No such file or directory</p><blockquote style="margin-top: 1em; margin-right: 25px; margin-bottom: 1em; margin-left: 25px; padding-left: 1em; font-style: normal; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; "><table border="0" cellspacing="0" cellpadding="0" style="margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; position: static; z-index: auto; "><tbody style="margin-top: 0px; "><tr style="margin-top: 0px; "><td style="margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 2px; padding-right: 2px; padding-bottom: 2px; padding-left: 5px; font-size: 10pt; margin-top: 0px; "><a class="near" href="txmt://open?line=198&url=file:///Users/clausman/Pictures/_photoGPS/Laufen/src/AMODConv_pathLaufen.py" style="margin-top: 0px; ">function main</a> in <strong>AMODConv_pathLaufen.py</strong> at line 198</td></tr><tr><td style="margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 2px; padding-right: 2px; padding-bottom: 2px; padding-left: 5px; font-size: 10pt; margin-top: 0px; "><pre class="snippet" style="font-size: 95%; font-family: LuxiMono, 'Bitstream Vera Sans Mono', Monaco, 'Courier New', monospace; word-wrap: break-word; white-space: pre-wrap; margin-top: 4pt; margin-right: 4pt; margin-bottom: 4pt; margin-left: 4pt; padding-top: 4pt; padding-right: 4pt; padding-bottom: 4pt; padding-left: 4pt; ">t3 = t2.astimezone(pytz.timezone(pytz.country_timezones('de')[0]))</pre></td></tr><tr><td style="margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 2px; padding-right: 2px; padding-bottom: 2px; padding-left: 5px; font-size: 10pt; margin-top: 0px; "><a class="near" href="txmt://open?line=202&url=file:///Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/pytz/__init__.py" style="margin-top: 0px; ">function country_timezones</a> in <strong>__init__.py</strong> at line 202</td></tr><tr><td style="margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 2px; padding-right: 2px; padding-bottom: 2px; padding-left: 5px; font-size: 10pt; margin-top: 0px; "><pre class="snippet" style="font-size: 95%; font-family: LuxiMono, 'Bitstream Vera Sans Mono', Monaco, 'Courier New', monospace; word-wrap: break-word; white-space: pre-wrap; margin-top: 4pt; margin-right: 4pt; margin-bottom: 4pt; margin-left: 4pt; padding-top: 4pt; padding-right: 4pt; padding-bottom: 4pt; padding-left: 4pt; ">zone_tab = open(os.path.join(os.path.dirname(__file__), 'zone.tab'))</pre></td></tr></tbody></table></blockquote></div><div id="exception_report" class="framed">Program exited with code #1 after 2.05 seconds.</div><div id="exception_report" class="framed"><br></div><div id="exception_report" class="framed"><br></div><div id="exception_report" class="framed">I guess it has to do with the pytz module?</div><div id="exception_report" class="framed">But why does it run on the terminal?</div><div id="exception_report" class="framed">Can there be a difference between running python on the terminal vs. from within TextMate?</div><div id="exception_report" class="framed">I am running OS X 10.5.6, TextMate 1.5.8(1498)</div><div id="exception_report" class="framed"><br></div><div id="exception_report" class="framed">TextMate does find the pytz module - at least it displays the pytz module help after hitting F3.</div><div id="exception_report" class="framed"><br></div><div id="exception_report" class="framed">Thanks for your help,</div><div id="exception_report" class="framed">Claus</div></span></div></body></html>