frankharkins / learning-content-tools Goto Github PK
View Code? Open in Web Editor NEWFor repos containing content for IBM Quantum's Learning Platform
License: Apache License 2.0
For repos containing content for IBM Quantum's Learning Platform
License: Apache License 2.0
Attempting to publish to production results in:
requests.exceptions.MissingSchema: Invalid URL 'learning-api.quantum-computing.ibm.com/items/lessons/cb7f673b-abf4-4c61-bdfc-4e1b40ff5d50?fields[]=translations.id,translations.languages_code': No scheme supplied. Perhaps you meant https://learning-api.quantum-computing.ibm.com/items/lessons/cb7f673b-abf4-4c61-bdfc-4e1b40ff5d50?fields[]=translations.id,translations.languages_code?
I'll test a fix & can create a PR - the site needs updating.
LEARNING_API_ENVIRONMENT
This is quite long and a bit messy โ try to refactor to make it easier to read and maintain.
Both database and website
For a course I am developing, I have one lesson which I want to publish to 'staging', but am not ready to publish to 'production'
I therefore have a lesson configured in iql.conf.yaml as follows:
- path: lessons/Quiz
idStaging: b49f924e-4173-ab7c-81c4-3f6eb0a8d3b0
idProduction:
In this case, the upload tool will fail with:
โ Push Quiz: Finding English translation...
Traceback (most recent call last):
File "/home/travis/virtualenv/python3.11.0/bin/sync-lessons", line 8, in
sys.exit(sync_lessons())
^^^^^^^^^^^^^^
File "/home/travis/virtualenv/python3.11.0/lib/python3.11/site-packages/iql_lesson_sync/init.py", line 55, in sync_lessons
api.push(lesson)
File "/home/travis/virtualenv/python3.11.0/lib/python3.11/site-packages/iql_lesson_sync/upload.py", line 93, in push
raise err
File "/home/travis/virtualenv/python3.11.0/lib/python3.11/site-packages/iql_lesson_sync/upload.py", line 82, in push
web_page = self._push(lesson, _log_fn)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/travis/virtualenv/python3.11.0/lib/python3.11/site-packages/iql_lesson_sync/upload.py", line 123, in _push
response.raise_for_status()
File "/home/travis/virtualenv/python3.11.0/lib/python3.11/site-packages/requests/models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://learning-api.quantum-computing.ibm.com/items/lessons/None?fields%5B%5D=translations.id,translations.languages_code
It would be useful to treat this as a warning (or successful) since it is performing as the user intends, and
the tool should run to completion.
originally in my case this lesson was mid way through my lesson list, so caused later lessons not to be published. A little reordering means it's easy to workaround.
I can look at a PR once we're past our release...
Getting 401 error when using static token, not sure what's causing it.
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.