René's URL Explorer Experiment


Title: check_function() not working as documented (or what am I missing?) · Issue #394 · datacamp/pythonwhat · GitHub

Open Graph Title: check_function() not working as documented (or what am I missing?) · Issue #394 · datacamp/pythonwhat

X Title: check_function() not working as documented (or what am I missing?) · Issue #394 · datacamp/pythonwhat

Description: Hello! Just recently stumbled across this project in conjunction with datacamp-light, and I'm really keen to incorporate into some online assignments for my students. However, I'm having trouble using check_function() in my SCT. Can't ev...

Open Graph Description: Hello! Just recently stumbled across this project in conjunction with datacamp-light, and I'm really keen to incorporate into some online assignments for my students. However, I'm having trouble us...

X Description: Hello! Just recently stumbled across this project in conjunction with datacamp-light, and I'm really keen to incorporate into some online assignments for my students. However, I'm having tr...

Opengraph URL: https://github.com/datacamp/pythonwhat/issues/394

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"check_function() not working as documented (or what am I missing?)","articleBody":"Hello!\r\n\r\nJust recently stumbled across this project in conjunction with datacamp-light, and I'm really keen to incorporate into some online assignments for my students.\r\n\r\nHowever, I'm having trouble using `check_function()` in my SCT. Can't even get the first example in under [\"Basic functionality\" (in your docs](https://pythonwhat.readthedocs.io/en/latest/articles/checking_function_calls.html#basic-functionality)) to work.\r\n\r\nHere's my markup:\r\n\r\n```html\r\n\u003cdiv data-datacamp-exercise data-lang=\"python\"\u003e\r\n  \u003ccode data-type=\"sample-code\"\u003e\r\n\r\n    round(2.718282, ndigits = 3)\r\n\r\n  \u003c/code\u003e\r\n  \u003ccode data-type=\"sct\"\u003e\r\n    Ex().check_function(\"round\").multi(\r\n      check_args(\"number\").has_equal_value(),\r\n      check_args(\"ndigits\").has_equal_value()\r\n    )\r\n  \u003c/code\u003e\r\n\u003c/div\u003e\r\n```\r\n\r\nThe result when I hit \"Run\" looks correct. But when I hit \"Submit, here's the error I get:\r\n\r\n```\r\nDataCamp encountered the following error:\r\nTraceback (most recent call last):\r\n  File \"/var/lib/python/site-packages/protobackend/output.py\", line 70, in wrapper\r\n    output = f(*args, **kwargs)\r\n  File \"/var/lib/python/site-packages/pythonbackend/commands.py\", line 63, in worker_dispatch\r\n    return d.dispatch(cmd)\r\n  File \"/var/lib/python/site-packages/protobackend/dispatcher.py\", line 28, in dispatch\r\n    cmd_output = cmd(pre_payload)\r\n  File \"/var/lib/python/site-packages/pythonbackend/Exercise.py\", line 123, in runSubmit\r\n    self.dc_force_diagnose,\r\n  File \"/var/lib/python/site-packages/pythonwhat/test_exercise.py\", line 67, in test_exercise\r\n    raise e\r\n  File \"/var/lib/python/site-packages/pythonwhat/test_exercise.py\", line 57, in test_exercise\r\n    exec(sct, sct_cntxt)\r\n  File \"\u003cstring\u003e\", line 1, in \u003cmodule\u003e\r\n  File \"/var/lib/python/site-packages/protowhat/sct_syntax.py\", line 258, in __call__\r\n    ChainedCall(self.function, args, kwargs), previous=self.chain\r\n  File \"/var/lib/python/site-packages/protowhat/sct_syntax.py\", line 225, in __init__\r\n    self._state = chained_call(state)\r\n  File \"/var/lib/python/site-packages/protowhat/sct_syntax.py\", line 113, in __call__\r\n    return self.callable(state, *self.args, **self.kwargs)\r\n  File \"/var/lib/python/site-packages/protowhat/sct_syntax.py\", line 78, in wrapper\r\n    force=isinstance(error, InstructorError),\r\n  File \"/var/lib/python/site-packages/protowhat/failure.py\", line 88, in _debug\r\n    raise failure_type(state.get_feedback(FeedbackComponent(feedback)), state.state_history)\r\nprotowhat.failure.InstructorError: `check_function()` couldn't find a call of `round()` in the solution code. Make sure you get the mapping right!\r\n\r\nDebug on error:\r\nSCT function state history: `check_function`\r\nLast test: `\u003cFail {'result': False, 'feedback': \u003cFeedbackComponent {'append': True, 'message': \"`check_function()` couldn't find a call of `round()` in the solution code. Make sure you get the mapping right!\", 'kwargs': {}}\u003e}\u003e`\r\n```","author":{"url":"https://github.com/gordonje","@type":"Person","name":"gordonje"},"datePublished":"2020-02-03T21:53:35.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/394/pythonwhat/issues/394"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:4c1ded01-0e3a-35e7-cb64-42864e196bc3
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id9164:7F630:21F73E2:2ECF344:698CDD72
html-safe-nonce3f3f4adf97d804b923b9a788f49f88933521fddaa6f64945065e320db4377f8e
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MTY0OjdGNjMwOjIxRjczRTI6MkVDRjM0NDo2OThDREQ3MiIsInZpc2l0b3JfaWQiOiI0NTMwMTY3ODk3NDAyNDMyODgyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac5b9bd4f2938f27d3b82c7a2f407183fbafb9b97c779f15af12bce63a26365cbd
hovercard-subject-tagissue:559357192
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/datacamp/pythonwhat/394/issue_layout
twitter:imagehttps://opengraph.githubassets.com/ddec8c7232c344efe0a1e87ef8c039909022ff7fc807b77a8ad65d4225064b1f/datacamp/pythonwhat/issues/394
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/ddec8c7232c344efe0a1e87ef8c039909022ff7fc807b77a8ad65d4225064b1f/datacamp/pythonwhat/issues/394
og:image:altHello! Just recently stumbled across this project in conjunction with datacamp-light, and I'm really keen to incorporate into some online assignments for my students. However, I'm having trouble us...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamegordonje
hostnamegithub.com
expected-hostnamegithub.com
None640eeb7b6ff4d8d106235d228c0c286e82592d4d2403227b5b2b4fc5832297a4
turbo-cache-controlno-preview
go-importgithub.com/datacamp/pythonwhat git https://github.com/datacamp/pythonwhat.git
octolytics-dimension-user_id6276968
octolytics-dimension-user_logindatacamp
octolytics-dimension-repository_id51361383
octolytics-dimension-repository_nwodatacamp/pythonwhat
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id51361383
octolytics-dimension-repository_network_root_nwodatacamp/pythonwhat
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release3d444f0a47beeeac94cddbb51c91ab408befe8d4
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/datacamp/pythonwhat/issues/394#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdatacamp%2Fpythonwhat%2Fissues%2F394
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdatacamp%2Fpythonwhat%2Fissues%2F394
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=datacamp%2Fpythonwhat
Reloadhttps://patch-diff.githubusercontent.com/datacamp/pythonwhat/issues/394
Reloadhttps://patch-diff.githubusercontent.com/datacamp/pythonwhat/issues/394
Reloadhttps://patch-diff.githubusercontent.com/datacamp/pythonwhat/issues/394
datacamp https://patch-diff.githubusercontent.com/datacamp
pythonwhathttps://patch-diff.githubusercontent.com/datacamp/pythonwhat
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Fdatacamp%2Fpythonwhat
Fork 31 https://patch-diff.githubusercontent.com/login?return_to=%2Fdatacamp%2Fpythonwhat
Star 74 https://patch-diff.githubusercontent.com/login?return_to=%2Fdatacamp%2Fpythonwhat
Code https://patch-diff.githubusercontent.com/datacamp/pythonwhat
Issues 34 https://patch-diff.githubusercontent.com/datacamp/pythonwhat/issues
Pull requests 3 https://patch-diff.githubusercontent.com/datacamp/pythonwhat/pulls
Projects 0 https://patch-diff.githubusercontent.com/datacamp/pythonwhat/projects
Wiki https://patch-diff.githubusercontent.com/datacamp/pythonwhat/wiki
Security 0 https://patch-diff.githubusercontent.com/datacamp/pythonwhat/security
Insights https://patch-diff.githubusercontent.com/datacamp/pythonwhat/pulse
Code https://patch-diff.githubusercontent.com/datacamp/pythonwhat
Issues https://patch-diff.githubusercontent.com/datacamp/pythonwhat/issues
Pull requests https://patch-diff.githubusercontent.com/datacamp/pythonwhat/pulls
Projects https://patch-diff.githubusercontent.com/datacamp/pythonwhat/projects
Wiki https://patch-diff.githubusercontent.com/datacamp/pythonwhat/wiki
Security https://patch-diff.githubusercontent.com/datacamp/pythonwhat/security
Insights https://patch-diff.githubusercontent.com/datacamp/pythonwhat/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/datacamp/pythonwhat/issues/394
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/datacamp/pythonwhat/issues/394
check_function() not working as documented (or what am I missing?)https://patch-diff.githubusercontent.com/datacamp/pythonwhat/issues/394#top
https://github.com/gordonje
https://github.com/gordonje
gordonjehttps://github.com/gordonje
on Feb 3, 2020https://github.com/datacamp/pythonwhat/issues/394#issue-559357192
"Basic functionality" (in your docshttps://pythonwhat.readthedocs.io/en/latest/articles/checking_function_calls.html#basic-functionality
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.