gatech-csl / jes

The Jython Environment for Students allows students to write Jython programs that can manipulate pictures, sounds, and videos.
http://mediacomputation.org/
60 stars 38 forks source link

calls to os.chdir() produces error #72

Closed leafstorm closed 10 years ago

leafstorm commented 10 years ago

From tothmich...@gmail.com on May 22, 2014 00:35:57

What steps will reproduce the problem?

import os
path = os.getcwd()
os.chdir(path)

What is the expected output? What do you see instead? I expect the chdir method to work and leave me in the same directory that getcwd() returned.

Instead I see the following:

>>> import os
>>> path = os.getcwd()
>>> os.chdir(path)
The error was: /Applications/jes-4-3.app/Contents/Resources/Java
OS system call failed.
An error occurred while making an operating system call. Please tell a TA what you were doing when this happened, so we may correct it.
>>>

What version of the product are you using? On what operating system? Version 4.3 on a Mac OS 10.9.2 Please provide any additional information below.

Original issue: http://code.google.com/p/mediacomp-jes/issues/detail?id=72

leafstorm commented 10 years ago

Our current version of Jython (2.2.1) does not support os.chdir() (if you open up Lib/javaos.py, it's just a function that immediately throws an error). Support was introduced in a later version (not sure which), and is present in Jython 2.5. This bug will be fixed automatically once we upgrade.

leafstorm commented 10 years ago

The Jython upgrade (commit 032de3fc) fixed this.