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

tspart.py does not pull in file correctly from other directories #1

Open
tmulry opened this issue Oct 5, 2014 · 0 comments
Open

tspart.py does not pull in file correctly from other directories #1

tmulry opened this issue Oct 5, 2014 · 0 comments

Comments

@tmulry
Copy link

tmulry commented Oct 5, 2014

I am getting a stack trace error when using tspart.pt on a file in a different directory.
e.g. $python tsp_art_tools/trunk/tspart.py Pictures/Gocupi/cascadebmpindex.pbm

Expected this to work OK with relative paths. Suggest updating code to set "infile" and "outfile" as absolute paths before working with them.

Script runs fine when python is invoked from the same dir as the input file.

Here is the full Trace.
Traceback (most recent call last):
File "tsp_art_tools/trunk/tspart.py", line 243, in
tsp_fd, tspfile = tempfile.mkstemp( suffix='.tsp', prefix=tmp_prefix, text=True )
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/tempfile.py", line 304, in mkstemp
return _mkstemp_inner(dir, prefix, suffix, flags)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/tempfile.py", line 239, in _mkstemp_inner
fd = _os.open(file, flags, 0600)
OSError: [Errno 2] No such file or directory: '/var/folders/dm/ll6_b6xx2b56sygrlzdw2vb40000gn/T/Pictures/Gocupi/cascadebmpindex.wFpjtz.tsp'

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

No branches or pull requests

1 participant