OnlineJudge icon indicating copy to clipboard operation
OnlineJudge copied to clipboard

python提交总是re

Open yaoshiu opened this issue 5 years ago • 11 comments

使用python提交总是re,将内存限制调至1g,时间限制调至60000ms依然无效

yaoshiu avatar Nov 03 '19 14:11 yaoshiu

看看提交详情页的详细数据,可能是用了什么奇怪的函数

virusdefender avatar Nov 03 '19 23:11 virusdefender

我也碰到同样的问题了,简单的hello world也报re print("Hello World!")

quqinghai avatar Nov 29 '19 02:11 quqinghai

我也有这个问题 更新:解决了,我的问题是题目内存设置太小导致的

xulouzhe avatar Dec 14 '19 03:12 xulouzhe

I'm facing the same problem even after setting memory limit to 1 GB and time limit to 60000 in python3 but python2 works fine.

praveenkumar-alpha avatar Jul 16 '20 14:07 praveenkumar-alpha

I'm facing the same problem even after setting memory limit to 1 GB and time limit to 60000 in python3 but python2 works fine.

when did you deploy the Onlinejudge? The Onlinejudge has upgraded these days, and upgraded the Python version. You should use docker-compose pull && docker-compose up -d to upgrade it. After upgrading, you should use these command to update language config.

docker exec -it oj-backend sh
python3 manage.py shell
from options.options import *
SysOptions.reset_languages()
exit()
exit

Harry-zklcdc avatar Jul 16 '20 14:07 Harry-zklcdc

@Harry-zklcdc after update language config problem still exists. Sysoptions has python36.pyc, which is same as judge/languages.py while docker env has python 3.7 . will that a problem? although try to set judge/languages.py to 3.7 doesn't solve the problem. one test case is fine. while multiple test case will case re in the last case.

smallst avatar Oct 01 '20 04:10 smallst

@Harry-zklcdc after update language config problem still exists. Sysoptions has python36.pyc, which is same as judge/languages.py while docker env has python 3.7 . will that a problem? although try to set judge/languages.py to 3.7 doesn't solve the problem. one test case is fine. while multiple test case will case re in the last case.

NoNoNo. docker env is python 3.7, but the docker env is the backend's Python version, isn't the JudgerServer's Python version. The Python version of JudgeServer is 3.6.9. So, DON'T CHANGE the judge/languages.yml

Harry-zklcdc avatar Oct 01 '20 04:10 Harry-zklcdc

@Harry-zklcdc oh,yes, i found it. but 3.6 is the origin broken one. runtime error in last test case if the number of test case more than 1. can you tell me the prob reason of runtime error, or where can i see the log of every submission ? maybe i can fix it by myself. i'm little in hurry to deploy this oj platform. thanks!

smallst avatar Oct 01 '20 04:10 smallst

@Harry-zklcdc oh,yes, i found it. but 3.6 is the origin broken one. runtime error in last test case if the number of test case more than 1. can you tell me the prob reason of runtime error, or where can i see the log of every submission ? maybe i can fix it by myself. i'm little in hurry to deploy this oj platform. thanks!

docker-compose.yml judge-server, debug=1

https://github.com/QingdaoU/OnlineJudgeDeploy/blob/2.0/docker-compose.yml#L44

Harry-zklcdc avatar Oct 01 '20 04:10 Harry-zklcdc

@Harry-zklcdc thanks!

smallst avatar Oct 01 '20 04:10 smallst

oh, god. it's my fault. re because of test case, not of platform

smallst avatar Oct 01 '20 10:10 smallst