![]() ![]() |
| |||||||||
| This page removed for FERPA compliance | ||||||||||
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
| If it's not repainting, then the recipe probably isn't functioning properly. Go through each line of your code – are you sure what it's doing is what you think it's supposed to be doing? Could it be that your IF's are set up wrong, so that actually none of the pixels get changed at all? You're also welcome to show your code to your TA or me for help. Mark Guzdial |
| The username and password for uploads from off-campus is "attach" (username) and "carmen" (password). Mark Guzdial |
| Can you send me your program and your picture to check, please? Thanks! Mark Guzdial |
| I'm still working on this one. Remember that we're actually saving the picture in JPEG format. JPEG is actually a compressed picture format that does change the picture in subtle ways. I'm wondering if it's preventing those EXACT values from being in the file. My HW1 is working the same way. I wouldn't worry about it – the TA's can tell from your program and from the look of the picture whether or not you got it right. Check out Fall2003 HW1 Posters – there's clearly a specific look to these kinds of pictures. Mark Guzdial |
| You should use the function writePictureTo as discussed in class. Mark Guzdial |
| Did you hold down the mouse button while you were moving the mouse over the picture? Mark Guzdial |
| Hmm, shouldn't require it, but sure, it'll work. Mark Guzdial |
| The input to posterize isn't a picture. Try printing it. Maybe it's a filename and you haven't made it into a picture yet? Mark Guzdial |
| You can save your picture using writePictureTo. I don't know why you're being told that there are no pictures to examine. Did you try showing it first, to make sure that it's a working picture? Mark Guzdial |
| For example writePicture(picture,"mypicture.jpg") Mark Guzdial |
| You're executing show() on something other than a picture. Try printing it first to see what it is. Mark Guzdial |
| Like the responder said. writePicture isn't defined, so it's a name that isn't found. Without quotes, jessica.jpg is also treated as a name (not a string), so Python complains when it can't find that, either. Student282 |
| I do, every day. Mark Guzdial |
| You can't have spaces or underscores in your filenames that you upload to the CoWeb. Mark Guzdial |
| Yes, you can write a program in JES to resize – we're going to be doing that starting Friday, in fact. But it's not easy to do. There are lots of programs, even shareware, that you can use to resize. You might just use a smaller picture for posting. Mark Guzdial |
| I don't think that there's anything wrong with the file. I'm thinking that you're not using the right variable when you're executing the repaint or posterize functions. Try PRINTing what you are sending as input before you send it as input, to see what it is. If it's not a picture, it won't work. Mark Guzdial |
| Guys, please read the above questions and comments before you ask the same thing. user: "attach" password: "carmen" Lauren Biddle |
| Go to http://coweb.cc.gatech.edu/cs1315turnin and select the correct TA. Then on the next page pick the assignment. Lauren Biddle |
| You don't have to post it on the CoWeb Lauren Biddle |
| What is the error? Check what "p" is – is it a pixel? Try printing it (you can put the print statement inside your program. Mark Guzdial |
| We want the recipe – that's what your grade will be based on. Student784 |
| Whoa! Never saw that one before. Go to the Edit menu, choose Options, and turn your mode to "Expert". That will give you REMOVED information in the error message. Try again, and tell us what it says (you can email me directly). Are you sure that "picture" is a picture object? Print it to be sure. Mark Guzdial |
| It's not the function that it's complaining about, Jason, it's the input. What are you passing as input? I'm guessing that you're passing a pixel in where it's working, but accidentaly passing a string where it's not. Mark Guzdial |
| You can print it out to show to me or a TA. Also check for things like colons at the end of "def" and "for" lines. Mark Guzdial |
| You can't, but don't worry about it. Just upload the new one. Mark Guzdial |
| You only get this off campus – see FAQ. Username "attach" and password "carmen". Mark Guzdial |
| You can use MediaTools, or you can print getPixel(pict,5,10) to see the pixel at column 5 row 10. Mark Guzdial |
| I just had someone send me their code, where they ran the code, it worked fine (i.e., it finished with no errors), but nothing happened to the picture when you repainted. It did the same thing for me, but then I figured it out – the spacing was wrong on all the IF and setRed/setGreen/setBlue lines. I clicked on the line right after the FOR loop and saw the blue box ONLY contained the lines red=..., green=..., blue=...? That meant that ONLY those lines were inside the block of the FOR loop. The rest – all the IF statements – were spaced differently so that they are AFTER the FOR loop. That meant that the FOR loop ended up not changing ANY pixels. The lesson is: Check your spacing. There should be 4 spaces before each IF (2 for the DEF, 2 for the FOR) and 6 spaces before each setRed/setGreen/setBlue (2 for DEF, 2 for FOR, 2 for IF). Mark Guzdial |
| It all depends on how the Web server defines "on campus." I think that some of Resnet is considered "off-campus" in terms of the network. Mark Guzdial |
| We've seen this once before. Print your picture. Do you get -1 for the height and width? If so, you have an old version of Java installed on your computer. Go to http://www.java.sun.com and install Java Runtime Environment (JRE). It's free. There's one on our CD, but if you have your own Java installed already, JES will try to use that. Mark Guzdial |
| You don't NEED to attach your picture to the Swiki – it's totally voluntary. Don't worry about attaching at all. Mark Guzdial |
| Declare hw1 like this def hw1(picture): not like this def hw1():. Use it like this hw1(mypicture) not like this hw1() Mark Guzdial |
| Why don't you email me your program and I'll take a look at it. Mark Guzdial |
| It did overwrite. Go to the Attach view of the page – you'll see that your turnin has an "(R2)" (second revision) next to it. Mark Guzdial |
| YUP! That was the problem. The setRed and setBlue lines were seen as outside the function, so "p" wasn't defined. Mark Guzdial |
| Yes, that's fine. Your TA will be able to see which one was submitted second and they will grade that one. Student117 |
| If you mean it isn't showing the new posterized version of the picture, instead of showing the picture before you posterize, you can show it afterwards and then all you see is the posterized version. I know sometimes my computer will only change part of a picture of not at all if I already have the picture displayed. |
| Your problem there is probably spacing. Make sure that you have everthing within that line spaced out how it needs to be. For instance, you should have included spaces after your commas. Remember JES can be very sensitive sometimes. Student117 |
| Just pick up the prequiz at the 3 pm section Student56 |
| But don't on the prequizzes being the same at 1 pm and 3 pm in the future! All the dates for pre-quizzes and quizzes are on the Syllabus. Mark Guzdial |
| Never saw that one before! Did you install JES on the computer yourself? Mark Guzdial |
| Look carefully at your variables. If all you changed was the placeholder name, then you're redefining picture inside your function, so your input picture is never getting changed. Mark Guzdial |
| Is "D:" your CD? If you're running from CD, you can't save like that, because you can't write to a CD. Try writePictureTo(picture,r"C:\katyjoboats.jpg") and see if the picture shows up on your C: drive. Mark Guzdial |
| There's a list of things to check on the Announcements page – did you check all those? You are NOT supposed to add your .py file. Instead, it should be open in the Program Area. Mark Guzdial |
| Copy it to your hard disk. Follow the directions for installing that are on the CD and that we went over in class. Mark Guzdial |
| Yes, that is correct. Mark Guzdial |
| PLEASE STOP ATTACHING YOUR PICTURES TO THIS PAGE! |