'Memory limit exceeded' error when trying to import urllib | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

'Memory limit exceeded' error when trying to import urllib

Does Code Playground allow to use Python's urllib module and get data from the web? When I write 'import urllib.request' (without quotation marks, of course), and nothing else, in the output page I see 'Memory limit exceeded'. So this happens even if I just import the module and do not have any other code. Does anyone know how to fix it?

26th Mar 2017, 6:10 PM
Max Miropoltsev
3 Answers
+ 8
I'm afraid it can't be done. Importing the whole module proved to be too much for the Playground to handle. Even before the current 'memory problems'.
26th Mar 2017, 6:25 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 1
Interestingly, it happens even if I write 'from urllib.request import urlopen' (suppose it should use less memory in this case)
26th Mar 2017, 7:37 PM
Max Miropoltsev
0
I don't know the answer to your question, but I do know sololearn playground is having issues with Python memory limit exceeded
26th Mar 2017, 6:21 PM
LordHill
LordHill - avatar