kevinyang372 / code-eval Goto Github PK
View Code? Open in Web Editor NEWFlask based autograder project
Flask based autograder project
When attempting to log in with an account which does not exist, an error is thrown.
It relates to the fact that flash
is undefined:
https://github.com/kevinyang372/codeEval/blob/master/web/serve.py#L103
Logging in with the [email protected]
works fine.
File "/Users/kevin/Desktop/Github/codeEval/venv/lib/python3.9/site-packages/werkzeug/routing.py", line 2020, in build
raise BuildError(endpoint, values, method, self)
werkzeug.routing.BuildError: Could not build url for endpoint 'summary.summary_case' with values ['result_id']. Did you forget to specify values ['course_id', 'session_id', 'user_id']?
Azure app service does not have default support for Flask applications and requires configurations on exposing endpoint to docker serve.
When executing the following code:
def add(x, y):
a = list([1,2,3])
return round(x + y)
def multiply(x, y):
return x * y
def subtract(x, y):
return x - y
Running result returns name list is not defined
#!/bin/bash -eo pipefail
python -m unittest test.test_example
Traceback (most recent call last):
File "/usr/local/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/local/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/usr/local/lib/python3.9/unittest/__main__.py", line 18, in <module>
main(module=None)
File "/usr/local/lib/python3.9/unittest/main.py", line 100, in __init__
self.parseArgs(argv)
File "/usr/local/lib/python3.9/unittest/main.py", line 147, in parseArgs
self.createTests()
File "/usr/local/lib/python3.9/unittest/main.py", line 158, in createTests
self.test = self.testLoader.loadTestsFromNames(self.testNames,
File "/usr/local/lib/python3.9/unittest/loader.py", line 220, in loadTestsFromNames
suites = [self.loadTestsFromName(name, module) for name in names]
File "/usr/local/lib/python3.9/unittest/loader.py", line 220, in <listcomp>
suites = [self.loadTestsFromName(name, module) for name in names]
File "/usr/local/lib/python3.9/unittest/loader.py", line 154, in loadTestsFromName
module = __import__(module_name)
File "/home/circleci/project/test/test_example.py", line 8, in <module>
from web import app, db
File "/home/circleci/project/web/__init__.py", line 60, in <module>
db.create_all()
File "/home/circleci/.local/lib/python3.9/site-packages/flask_sqlalchemy/__init__.py", line 963, in create_all
self._execute_for_all_tables(app, bind, 'create_all')
File "/home/circleci/.local/lib/python3.9/site-packages/flask_sqlalchemy/__init__.py", line 955, in _execute_for_all_tables
op(bind=self.get_engine(app, bind), **extra)
File "/home/circleci/.local/lib/python3.9/site-packages/flask_sqlalchemy/__init__.py", line 896, in get_engine
return connector.get_engine()
File "/home/circleci/.local/lib/python3.9/site-packages/flask_sqlalchemy/__init__.py", line 556, in get_engine
self._sa.apply_driver_hacks(self._app, info, options)
File "/home/circleci/.local/lib/python3.9/site-packages/flask_sqlalchemy/__init__.py", line 830, in apply_driver_hacks
if info.drivername.startswith('mysql'):
AttributeError: 'NoneType' object has no attribute 'drivername'
Exited with code exit status 1
CircleCI received exit code 1
Deployments failed with unknown error: 6:33:11 PM codeEval: /tmp/BuildScriptGenerator/edd85665ecbb4bd3b9531022c1702003/build.sh: line 97: source: filename argument required
[2021-01-27 08:37:09,194] ERROR in app: Exception on /compare/19/1 [GET]
Traceback (most recent call last):
File "/Users/kevin/Desktop/Github/code-eval/venv/lib/python3.9/site-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/Users/kevin/Desktop/Github/code-eval/venv/lib/python3.9/site-packages/flask/app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/Users/kevin/Desktop/Github/code-eval/venv/lib/python3.9/site-packages/flask/app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/Users/kevin/Desktop/Github/code-eval/venv/lib/python3.9/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/Users/kevin/Desktop/Github/code-eval/venv/lib/python3.9/site-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/Users/kevin/Desktop/Github/code-eval/venv/lib/python3.9/site-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/Users/kevin/Desktop/Github/code-eval/web/utils.py", line 115, in decorated_function
return f(*args, **kwargs)
File "web/blueprints/compare.py", line 20, in compare
parsed1, parsed2 = p.highlight_diff()
File "/Users/kevin/Desktop/Github/code-eval/web/plagiarism.py", line 260, in highlight_diff
d = self.ast_match_wrapper(self.tree_1, self.tree_2)
File "/Users/kevin/Desktop/Github/code-eval/web/plagiarism.py", line 253, in ast_match_wrapper
res = func(node1, node2)
File "/Users/kevin/Desktop/Github/code-eval/web/plagiarism.py", line 229, in func
elif not func(v, getattr(node2, k), next_parent):
File "/Users/kevin/Desktop/Github/code-eval/web/plagiarism.py", line 246, in func
if not func(node1[i], node2[i]):
File "/Users/kevin/Desktop/Github/code-eval/web/plagiarism.py", line 229, in func
elif not func(v, getattr(node2, k), next_parent):
File "/Users/kevin/Desktop/Github/code-eval/web/plagiarism.py", line 246, in func
if not func(node1[i], node2[i]):
IndexError: list index out of range
Steps to reproduce:
def subtract(*args):
return args[0] - args[1]
Traceback (most recent call last):
File "/Users/kevin/Desktop/Github/codeEval/venv/lib/python3.9/site-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/Users/kevin/Desktop/Github/codeEval/venv/lib/python3.9/site-packages/flask/app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/Users/kevin/Desktop/Github/codeEval/venv/lib/python3.9/site-packages/flask/app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/Users/kevin/Desktop/Github/codeEval/venv/lib/python3.9/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/Users/kevin/Desktop/Github/codeEval/venv/lib/python3.9/site-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/Users/kevin/Desktop/Github/codeEval/venv/lib/python3.9/site-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/Users/kevin/Desktop/Github/codeEval/venv/lib/python3.9/site-packages/flask_login/utils.py", line 272, in decorated_view
return func(*args, **kwargs)
File "web/blueprints/submissions.py", line 68, in submission
res = temp.test(runtime=setting.runtime, blacklist=setting.get_blacklist())
File "web/base.py", line 25, in test
result[entry_point] = self._test_question(runtime, entry_point, blacklist)
File "web/base.py", line 79, in _test_question
p.start()
File "/usr/local/Cellar/[email protected]/3.9.0_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/process.py", line 121, in start
self._popen = self._Popen(self)
File "/usr/local/Cellar/[email protected]/3.9.0_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/context.py", line 224, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "/usr/local/Cellar/[email protected]/3.9.0_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/context.py", line 284, in _Popen
return Popen(process_obj)
File "/usr/local/Cellar/[email protected]/3.9.0_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/popen_spawn_posix.py", line 32, in __init__
super().__init__(process_obj)
File "/usr/local/Cellar/[email protected]/3.9.0_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/popen_fork.py", line 19, in __init__
self._launch(process_obj)
File "/usr/local/Cellar/[email protected]/3.9.0_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/popen_spawn_posix.py", line 47, in _launch
reduction.dump(process_obj, fp)
File "/usr/local/Cellar/[email protected]/3.9.0_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/reduction.py", line 60, in dump
ForkingPickler(file, protocol).dump(obj)
AttributeError: Can't pickle local object 'BaseTest._test_question.<locals>.getResult'
Tested both locally and on heroku that pop-up model on submission_index does not work any more
No error in the debugging panel.
The application log shows that `AttributeError: 'NoneType' object has no attribute 'drivername'
Deployment log
7:03:36 PM codeEval: Triggering recycle (preview mode disabled).
7:03:36 PM codeEval: Deployment successful.
7:03:41 PM: Deployment to "codeEval" completed.
7:04:23 PM: "codeEval" reported a critical error: Exception
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.