Ask coding questions

← Back to all posts
3
Repl.it or code issue?
ChristopherBurn (6)

I've started a coding club in our school, and we have been collaboratively creating a game in Python with Turtle. It worked just fine until last week. Now for some of the computers (everyone is on Chromebooks) the opening screen turtle drawer just takes off and the game freezes for about 5 minutes. For others the game still functions as expected. I have tried debugging, but there is no error I can see in the code and as it occurs only on certain machines I am wondering if it is a repl.it issue and not a code issue. I have also put the code into other online editors and it runs perfectly. We can't install IDE's on the Chromebooks (school division controlled) and we like repl.it for it's multiplayer capacity.
Any ideas? The issue generally occurs while drawing the "a" in "tank", but if you comment that section out the issue will occur elsewhere in the title drawing process.
I'd love to get this working again so we can continue with it. But it's very hard to test it when it only runs on one machine.

Edit* See link: https://repl.it/@ChristopherBurn/TurtleTank

Commentshotnewtop
4
Masy (17)

@ChristopherBurn Its not repl nor your code. Chromebooks have a issue with running repl scripts as my chromebook at my school. Im figuring your school locks down chromebooks with either goguardian or Lan School and in that feature they mistake some program running websites as a threat so the chromebook is trying to figure whats going on and the program freezes. As for the HP laptop its possibly just old hardware or your using too much of the Repl system. If you possibly talk to the school to get the website scripts allowed it may work. Just a theory as I dont see anything wrong with the code but I may be mistaken.

Edited

2
ChristopherBurn (6)

@Masy We don't use goguardian or lanschool, although we do have something called SophosEndpoint. That being said, they were running the code just fine for a couple months until just recently.

4
Masy (17)

@ChristopherBurn So I googled SophosEndpoint and one of the first sentances is "protection product that combines antimalware, web and application control" Im guessing your school has blocked some sort of js functioning on the webpage and that is the most probable reason I can think of. Your code works fine i've tested it twice now. Runs perfectly fine on my Mac and Chromebook. Im guessing that the reason for the chromebooks. It also looks like the software controls what operations run on the machine

Edited

2
ChristopherBurn (6)

@Masy So I talked to the divisional IT people, and only the staff laptop's get Sophos Endpoint, the Chromebooks don't have software like that installed and just use a preselected set of Chrome settings for protections. They have to allow JavaScript though, and it was running fine before. The IT guys are looking at it to see if it is something on their end, so I'll keep everyone posted if they find something.

2
Masy (17)

@ChristopherBurn Copy that, If you need more help let me know

2
ChristopherBurn (6)

@Masy According to my IT department, it may be a problem on repl.it's side..."My best guess, when I look at this is that it is a flash based engine. Now, that being said, Google Chrome has its own embedded version of flash. This project, seems to only sieze up in Chrome. I tried on my machine and received the same results as you, however, when I opened it in Firefox or Microsoft Edge, it ran completely fine. I would let their technical department know of this finding."

2
PythinPython (6)

I recommend forking the repl and see if that version works.

1
ChristopherBurn (6)

@PythinPython We tried that, no dice. Computers that were not working continued to not work. If I copy the exact same code into a different online compiler, it works though.

1
ChristopherBurn (6)

@PythinPython Update: I heard back from my IT department... "My best guess, when I look at this is that it is a flash based engine. Now, that being said, Google Chrome has its own embedded version of flash. This project, seems to only sieze up in Chrome. I tried on my machine and received the same results as you, however, when I opened it in Firefox or Microsoft Edge, it ran completely fine. I would let their technical department know of this finding."

2
Pythonier (299)

It works fine for me and I am using a chromebook. Cool Game!

2
a5rocks (501)

BTW works for me.

1
ChristopherBurn (6)

@a5rocks What kind of system are you running? I'm on an hp laptop and it doesn't work, and the chromebooks have been about 3/4 not working 1/4 working.

3
Vandesm14 (483)

@ChristopherBurn Are you able to use dev tools on the Chromebook? (ex: Inspect Element). If you are, profiling the performance of the site may point out that the Chromebook's don't do well under intensive JS (which would render the output from the python code)

1
ChristopherBurn (6)

@Vandesm14 Unfortunately not. The sysadmins here have locked the Chromebooks pretty solidly. It doesn't run on my hp laptop either though, which is what really surprises me.

2
Vandesm14 (483)

@ChristopherBurn It works for me. @a5rocks, do you have a demo turtle program he can run in order to see if the policy blocks running the GFX render that repl.it uses for their turtle output?

2
a5rocks (501)

@Vandesm14 nah, but I will in a second: https://repl.it/@a5rocks/DoubleCheapDoom

(lol example code ftw)

1
ChristopherBurn (6)

@Vandesm14 I was using repl.it for coding this. It worked fine for literally months until just 2 weeks ago. I can turtle code with no problem most of the time on both the HP laptop and the Chromebooks.

1
2
Vandesm14 (483)

First of all, that's a ton of code. Do you mind putting all of your code into a repl?

1
ChristopherBurn (6)

@Vandesm14 I've updated the post with a link. Thanks!

2
a5rocks (501)

Could you post the repl link? The code is kinda long and with a repl link I can run it without making a new repl.

1
ChristopherBurn (6)

@a5rocks I've updated the post with a link. Thanks!

1
BrianTheado (2)

I am able to duplicate the issue on my linux desktop when I use chrome and when I use firefox on the same it works fine.

It looks to me like the python interpreter gets stuck executing the same line of code over and over. I made this fork (https://repl.it/@BrianTheado/TurtleTank-1) and the 'print("2")' statement runs endlessly until I stop the interpreter.

It looks like repl.it folks are using http://www.skulpt.org version of python for the python turtle based repls. Apparently it is a python interpreter written in javascript so it can run client side in the browser.

This version of python isn't nearly as mature as normal python, so the issue may be with skulpt or the version of skulpt repl.it is using. Using the developer tools, I can't really tell what version of skulpt is being used...all the javascript is minified.

My guess is the skulpt python interpreter is going haywire for some reason. I would think most chromebooks are kept at the same chrome versions, so it is mysterious how it works on some but not others.

I'm pretty sure the comment from your IT guys is wrong...there is no flash here...it should be all javascript.

I'm not really sure how to figure this one out.

1
algore (8)

It works on my chromebook just fine, my assumption is that it may be an issue with the browser you are using, or the browser settings. But I can not be sure 100% but the game looks great keep up the work and I hope you find a solution to your problem soon.

1
IzanLarumbe (27)

I am using the chromebook to code since january. I never got these type of problems.

Also sometimes internet down cuz the updates are gay and take 4/4 of your internet to download tough..

1
SadikMohamed (5)

you guys were... very productive with your time

1
MATTHEWBECHTEL (121)

I’d help but I have no experience with the python-turtle programmig language.