Change Contents of the Bubble
Welcome to CS1315. Click on the python to add comments.

Looking for the book? They have it at the Engineer's Bookstore at 748 Marietta St NW. Here is there website: http://www.engrbookstore.com/ - Monica

Hotspots: Slides and CodeTA CornerComments?AnnouncementsFAQStatic Webspace
View this PageEdit this Page (locked)Uploads to this PageHistory of this PageHomeRecent ChangesSearchHelp Guide

Lab 2 Questions

Got questions about Lab 2? Put 'em here!


About lab 2, JES won't run it because the code for the first example seems to be off a little because you have to "makeSound(f)" do you not instead of just "s = sound(f)"? and the "f" variable needs to be more precise in the filepath doesn't it? Such as "C:\C:\Documents and Settings\Chris Sung\My Documents\cs1315\mediasources\Elliot-hello.wav"?

Chris Sung

So where do we turn Lab 2 in?

Chris, you're right on both points. You'll turn Lab 2 in via JES – there is Help for how to turnin in JES, and we'll get some documentation up on the lab ASAP. Mark Guzdial


I have window2000, how can i install java or jes? I'M having tough time with this.

Oh. excuse me, I think it just worked with my window2000.java and jes.disregard the above question.

For some reason every time I try to turn in my lab 2 it gives me and error message. Is there a reason for this?

What is the error message?


I keep getting an error message also every time I try to turn in my lab 2 work. The message is: "An unexpected error has occurred in the turnin process. It is likely that the program turnin has failed. Please check your GT# and Mailserver inside of JES's settings and resubmit the assignment." I already checked my GT# and Mailserver and I think I have it all set up right.
Please contact your TA and work with them. You definitely do NOT have your GT# and mailserver set up correctly. He or she can help you set it right. Mark Guzdial


Do we turn in our JES part of the lab, the two example problems, as one single "recipe" or do we do them separately?


Lab 2 instructions say "cut' and "paste" into the new JES file.do i edit it or just leave it as it is and save-load,coz when I do this, its not working.should I leave the pasted statements as they are? it doesn't work.

You edit it. "Doesn't work" is exactly the issue – doesn't the lab ask you to look at errors that you got?

I receive an error message, it is as follows: "Out of Memory. You might want to try the -mx flag to increase heap size."
Are you using the JES on the CD, or the alternative version? If the alternative version, there is a fix – it's a more complicated command, but it works fine. I've posted it to An Alternative Way to Run JES page. Mark Guzdial

On example 2 my code looks like this . . .
  1. Add example2() here
def example2():
f = pickAFile()
s = makeSound(f)
play(s)

When I load it says >>> A syntax error is contained in the code – I can't read it as Python.
The error is on line 17
And if I type in example2() and hit enter i get – A local or global name could not be found.
Do I need to define pickAFile?
No, pickAFile() is defined. What's on line 17? Make sure that lines that aren't Python are preceded by "#". Mark Guzdial


Do we need to turn in both example 1 and example 2? Example 2 won't work if example 1 is on the same page. Should we just write over example 1 to do example 2?
Why doesn't it? What error do you get? Mark Guzdial


i can't submit my assignment either. i live off campus...what do i need to put for the server???
The same name that you typed into Outlook – that's your mailserver. Mark Guzdial


i use smtp.mail.gatech.edu for outlook and i live off campus...but this won't work for submitting jes. what else can i try?
Off-campus, do you have Internet access? Who through? That's who you have to use for your off-campus turnin from JES. This will be discussed in recitation. Mark Guzdial

I live off campus and I switched my server from smtp.mail.gatech.edu to smtp.prism.gatech.edu and it finally worked so you may want to try that.

My problem is with the very first part of the lab... i copied everything and pasted and saved it into Jes... when i push "load" i receive this error message
>>>A syntax error is contained in the code – I can't read it as Python.
The error is on line 10
line ten is f = 'Elliot-hello.wav'

I have no idea what's wrong or how i should fix it... any suggestions?
KRISTIE FISHER
Hint: You are SUPPOSED to get an error in the first part of the lab – so that you get used to errors in JES. Read through the rest of the lab. Mark Guzdial

Okay, I'm not really clear on how to fix this problem with it not sending either. I checked my gt number and all of that does seem to be correct. It still says an unexpected error has occured in the turn in process.

Hey, is Microsoft Word supposed to be part of Lab 2? I assumed that the numbers by the links to the labs corresponded to the Lab number. However, the link for the Microsoft Word Lab is next to the 2, but says Lab 3 when you actually go to the link. So, does that mean that Lab 3 is Microsoft Word and the link next to the 3 or what?
Rebecca Phillips

Microsoft Word is part of Lab 2 Mark Guzdial


Two questions... one, what kind of answeres are looking for for the 3 small questions at the end of the JES lab?

And two, in the word lab part, when spell-checking... how much do we need to edit and change? There are tons of small context errors; do these matter? I assumed the exercise was just to show that we know how to use spell check.... but I could be wrong. So what corrections in spelling or grammar should we make to demonstrate our mastery of spell check? Justin Kennon

Basically, the idea for that is that we want you to use the spell checker to fix the blatant spelling errors. Obviously, the spell checker is going to question you about people's names, or even CS-specific terms. Those are OK – you can leave them. But the spell checker will find spelling errors where it is obvious it is really and honestly a spelling error – for example, maybe some of the vowels in the word are messed up. In that case, the word should be fixed. Jim Gruen


I live off-campus, and the server I use to send Outlook, is the same as on campus..."smtp.gatech.edu." I have Bell South DSL, and using that server name doesn't work either. Has anybody off-campus successfully submitted the lab yet?

When trying to uplaod the Lab2 cut and paste command, it told me there was a spacing error in line 51, which was Lab2a Jython file. How can I fix this?

Lots of people seem to be having cut and paste issues. Please check to make sure the that the spacing is correct in the pasted text. Also, I just changed the format of the code on the lab2 page, so you might want to try copying and pasting again and see if that works better. Jim Gruen

When I try to load the new saved program for example two it says >>> A syntax error is contained in the code – I can't read it as Python.
The error is on line 27. All line 27 says is #Question 3: What should I do?


Sometimes JES will highlight an error when the actual problem is on the line above or below the highlighted line. Check the surrounding area of your program as well. If nothing is obvious, check the spacing as well. Jim Gruen


Is this the lab newsgroup section? Well, my error occurred on line 3 which states s = makeSound(f). The message said ">>> A syntax error is contained in the code – I can't read it as Python.
The error is on line 3" I also have the same question for living off campus since I seem to be having problems.

GRRRR! I have my gt mail going through my outlook, my jes works, my lab 2 is done, but it will not let me submit. I do live off campus and have ATT and I have as my server for JES exactly what I have as my server for Outlook. Anyone have any suggestions? If I go to recitation will they be able to help me or not?

Yes, I think they can help you at recitation. Or send email to your TA, or go to their or my office hours. Mark Guzdial

when i go to assignment to submit menu, there is no lab 2 option for me. i don't know what is happening or how to turn it in. it says "error reading assignment list from network." what do i do?
The assignment list is read from the network when you open the turnin box. If you're not hooked up to the network, it can't read the assignment list. Mark Guzdial

The same thing happened to me, I can't find my lab 2 on the submit assignment box. I am working on campus and I think my mail server info is correct.

In the JES part of Lab 2, there's a paragraph that doesn't end correctly. It's just before starting example2. The paragraph reads
"What if we wanted to play a different wav file? We would have to change the path name, save the file, and load it. And we would have to do this everytime we wanted to play a new sound! How annoying. Fortunately, there is a better way. There is a function called pickAFile() that will let you select a"
What is the last sentence supposed to say? Is it important to the lab.

Fixed, thanks! Jim Gruen

Also, I had already installed JES before doing the lab and had the sound files on my hard drive. So, instead of my computer saying "...JES\mediasources" it says "...JES CD\ mediasources". Does this matter?

Probably not, though you may want to change the name of the folder from "JES CD" to "JES" just for simplicity's sake. Jim Gruen

One last question, my computer runs the recipe fine regardless whether I use a back or forward slash and it doesn't need the "r". It works without it too.
Rebecca Phillips


What kind of file should we save our Word document to?
The same kind of file you got it as: doc Adam Wilson

in example 1 of lab 2, jes keeps giving me this error message: "There is no file at ..\JES\mediasources\Elliot-hello.wav
An error occurred attempting to pass an argument to a function.
Please check line 19 of C:\Documents and Settings\Shannon Joiner\My Documents\lab2a.py" this is not the same error message as is posted on the lab directions. does anyone knwo how i can fix this?? ive typed the recipe exactly as it should be but its not working... any suggestions?

When we changed the line in the lab from "s = sound(f)" to "s = makeSound(f)" the error changed as well. The error you gave is actually the correct error. I'll go fix the lab now. Thanks! Jim Gruen


In class and on the Lab 2 assignment page, Prof. Guzdial said to make sure to put the r in front of file names and quotation marks around file names on Windows computers (r"C://MyDocuments...). I have Windows and did not have the r in front of my file name, and my program still ran. Also, on the assignment page, there are just single quotes around the file name ('Elliot-hello.wav'). I just changed the program as it says and left the single quotes and the program still worked. What's the deal? Do Windows users really have to put the r in front of file names, and is it single or double quotes?
Python will accept single or double quotes. You need the "r" if you use traditional Windows path/file names. If you print what pickAFile() returns, you'll see backslashes "\". Python uses backslashes for specific meanings. If you use forward slashes "/", then Python will convert those for you for Windows and all is well, but it's not actually how most Windows programs handle paths. If you want to use traditional Windows paths, you have to have the "R". Mark Guzdial

Is there any way that we can find out whether or not you recieved our lab? i am kinda worried mine didn't go through. thanks.
You can ask our TA direcly whether your lab went through - Jose



Syntax Error Problems ?

If you've cut-and-pasted directly from the web into JES and yet you are getting syntax errors (>>> A syntax error is contained in the code – I can't read it as Python.). Try typing everything in manually instead of using copy-paste.

Sometimes (yes, it happened to me too) the paste command carries along certain "invisible" information that obviously JES will not recognize... (thus, the syntax error).

If you've typed everything in yourself and double-checked that it is exactly like the example on the web and you are still getting errors, contact your TA directly and send him/her your Python file as an attachment. - Jose


And Jim Gruen just tried reformatting the Lab 2 page, so it might copy easier now. Mark Guzdial


For JES, my mail server is cc.gatech.edu instead of smtp.prism.gatech.edu. Is this ok? - Felicia

Yes, that is the default setting for JES. Matt Wallace

I'm trying to submit my assignment but it will not send. I used cc.gatech.edu and smtp.prism.gatech.edu as the server but neither will work.
Are you on or off campus? If you're off campus try to use your ISP's server. If you're on campus, you might want to give smtp.mail.gatech.edu a try. Also, make sure that your GT num is correct and all lower case. Adam Wilson

I used smtp.mail.gatech.edu and it was still an error.
Are you on or off campus? If you're off, what Internet Service Provider do you use? Adam Wilson

I'm on campus
OIT says that smtp.mail.gatech.edu is the mail server for your account. Hmmm... If your gt num is fine inside of the turnin config, then it should work. Let's try this: send me an email (awilson@cc.gatech.edu) with your name and gt number. Adam Wilson

OK, I had completely finished the first part of Lab 2. I had saved it and closed the program. Later, I wanted to proofread my work, so I opened Jes, and loaded my program. Everything was as it should have been. I didn't alter anything in my program or re-save it. I opened it, read it, and then closed it again. Later, once I had finished the Word part of the lab, I opened Jes again. I tried to open my program to turn it in. It told me it had opened the file – the words "Lab 2a.py" were in the title bar of the window. However, my screen was completely blank. I exited Jes, went to My Documents, found the file, held my cursor over it, and it told me that the file contained 0 bytes! My program disappeared! I rebooted my computer and tried again. No luck. I searched for it. No luck. Looked through "temp" and "recent" file folders. No luck!! For the life of me, I cannot fathom what happened to it. Jes seems to have altered (in this case, deleted) my file. I didn't tell it to. I didn't alter, change, save it, etc. Does Jes somehow erase files unless you save them before you close it? Even it's just a file you opened to look at? As I said, I didn't give it any commands to do anything other than open the file. This is extremely obnoxious, as I have now done the first part of this week's lab TWICE. Could someone please tell me what happened? So I can make sure it doesn't happen again? Michelle Tougas

I can't get my Lab 2 to submit. I'm off campus. I tried using the "smtp" before and without it for "cc.gatech.edu, prism.gatech.edu, mail.gatech.edu" I even tried to sumbit through "msn.com"
Rebecca Phillips
Try mail.msn.com?

I live off campus and I tried using the smtp server and my ISP's server and it still didn't work. It kept saying that the program failed or something.
Natalie Cohen
Natalie, I'll give you access to my SMTP server to try. It should work. I'll give you details in class. However, it is possible that your ISP is filtering port 25 (SMTP) and that could be your problem. Scott Forbus

IF ALL ELSE FAILS

Mail your JES file to your TA directly. Mark Guzdial


Does it matter which TA?
Yes, it does. You should have gotten an email from your TA introducing themselves. He/She is your TA, and the person who needs to get all your work Adam Wilson

Now I'm even on campus in the library and I've tried cc and smtp and nothing will work. I will email it but any suggestions on how to send it from the library?
I installed and ran it from the library without a problem. I think I used cc.gatech.edu and it worked fine for me. Try using acme.gatech.edu or prism.gatech.edu Angela Liang