datacamp / datacamp/datacamp-light
SCT Help
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.4k
- Forks
- 366
- Avg merge
- 2h 17m
- Merged PRs (30d)
- 2
Description
I am sure this a total noob question. I am using React and the boilerplate code for a python example.
<div data-datacamp-exercise data-lang="python">
<code data-type="pre-exercise-code">
# no pec
</code>
<code data-type="sample-code">
# Create a variable a, equal to 5
# Print out a
</code>
<code data-type="solution">
# Create a variable a, equal to 5
a = 5
# Print out a
print(a)
</code>
<code data-type="sct">
test_object("a")
test_function("print")
success_msg("Great job!")
</code>
<div data-type="hint">
Use the assignment operator (<code>=</code>) to create the variable <code>a</code>.
</div>
</div>
However, no matter what I put in the editor to submit, I get this error every time.
DataCamp encountered the following error:
Traceback (most recent call last):
File "/var/lib/python/site-packages/protobackend/output.py", line 70, in wrapper
output = f(*args, **kwargs)
File "/var/lib/python/site-packages/pythonbackend/commands.py", line 63, in worker_dispatch
return d.dispatch(cmd)
File "/var/lib/python/site-packages/protobackend/dispatcher.py", line 28, in dispatch
cmd_output = cmd(pre_payload)
File "/var/lib/python/site-packages/pythonbackend/Exercise.py", line 123, in runSubmit
self.dc_force_diagnose,
File "/var/lib/python/site-packages/pythonwhat/test_exercise.py", line 57, in test_exercise
exec(sct, sct_cntxt)
File "", line 1
test_object("a") test_function("print") success_msg("Great job!")
^
SyntaxError: invalid syntax
I get the same error on localhost and deployed site, so I don't believe it is related to those, unless there is some kind of permissions issue I haven't came across in researching.
I looked into pythonwhat and going down that path, but that seems like it shouldn't be needed to use the basic out of the box code base. Any help with this would be greatly appreciated.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the submitted SCT in the Python example, then inspect pythonbackend/Exercise.py and pythonwhat/test_exercise.py around SCT execution. Compare the generated SCT input with the separate test commands shown in the issue. Done means the example submits successfully locally and on the deployed site, with a regression test covering the SCT format.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, react, typescript
- Domain
- backend, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100