Troubleshooting
General Questions
Please email our team at contact@callysto.ca. Questions will be answered Monday to Friday, 9am-4pm Mountain Daylight Time.
We suggest going to our “Getting Started” page – it has a sample lesson plan for teachers as well as links to vides about how to use our online notebooks. From there, you can explore our curriculum-aligned learning modules, example lesson plans, and online courses.
These are curriculum-aligned online documents called Jupyter notebooks that include text, code, and often visualizations. They can run on the Callysto Hub or other Jupyter hosts.
The original versions are stored on GitHub. Clicking a link on the learning modules page creates copies for you in your Callysto Hub account. The Callysto Hub servers are located in Alberta, Canada.
Yes. All Callysto instructional materials are licensed Creative Commons Attribution, which means you can share and adapt as long as you give credit. For more information, see the license.
Yes. Anyone can take the Callysto online course. The courses are most appropriate for students in Grades 8 through 12 and their teachers.
Yes, absolutely.
We expect Jupyter notebooks to continue to be widely used in academia and industry as it is a very powerful, popular, open-source technology. Our Callysto project is based on Jupyter technology and we currently have funding to the end of the 2020/2021 school year.
Here’s a description from the Jupyter webpage: “Project Jupyter is a non-profit, open-source project, born out of the IPython Project in 2014 as it evolved to support interactive data science and scientific computing across all programming languages. Jupyter will always be 100% open-source software, free for all to use and released under the liberal terms of the modified BSD license.”
Yes. Jupyter notebooks are accessible anywhere in the world where there is a connection to the internet. It is a global standard, and we are not aware of any nations blocking access to these tools.
Depending on reading comprehension levels, we suggest students be between 10-17 years of age (Grades 5-12). Using Jupyter notebooks to teach data science is also suitable for post-secondary students.
Callysto Hub and Jupyter Notebook Questions
Once the learning module has finished loading, click on the “Cell” drop-down menu and select “Run All.” Each cell can also be run individually by selecting it then pressing the “Run” icon or pressing “Ctrl + Enter” or “Shift + Enter.” If it still does not run, check that the cell is set to be a “Code” cell. In the toolbar, there is a drop-down menu that gives you a choice of “Code”, “Markdown”, “Raw NBConvert” or “Heading.” You want to choose “Code” (Code is the default, but sometimes it gets changed by accident).
Follow these instructions and watch the accompanying video.
To save Callysto notebooks (Jupyter notebooks) onto your computer, you need to download the file.
How to download Jupyter notebooks from the Callysto Hub
• Select a file shown in the Callysto Hub webpage.
• Click on the “download” button to download it to your computer.
You can also download a notebook directly from the notebook webpage itself. Under the “File” tab click “Download as...” You will see a variety of file formats you can download the notebook as. The most useful formats ones are “Notebook” to create Jupter notebook, “HTML” to create an html webpage, or “PDF” to create a standard PDF document.
Moving files from your computer to the Callysto Hub (in the cloud) is called “uploading” a file.
How to upload files onto the Callysto Hub:
- Click on the “Upload” button on the Callysto Hub.
- Follow the prompts to select the file you want and start the upload.
When a cell is green, it means it’s ready to be edited – you can type into it, or cut, copy, paste. Blue means the cell has been selected but isn’t ready for edits. To make the cell editable, click onto it – then it will turn green.
Green cell (A cell that’s editable)
Blue cell (A cell that’s selected, but needs to be clicked to be editable)
Your Callysto files are stored on a computer “in the cloud”, specifically on some hardware based in the servers of Cybera Inc. in Alberta, Canada. They are safe and secure.
Your Python code is running on the computers in Alberta. Your own personal computer or internet device is simply running a web browser that acts as a “window” or display unit to see, edit, and run the notebook contents over an internet connection. This is why it is useful to have a reasonably fast internet connection for your computer.
Select the file in the Callysto Hub dashboard page, then click on the “Move” button. The computer will prompt you to type in the name of the destination folder (or path to the folder) where you want to move the file to. It is important to get the spelling of the folder exactly correct. It is sometimes helpful to write down the name of the folder, or its path, before doing the move. This way, you will have the details correct.
Yes. Typically, you should run cells in the order they appear in the notebook, especially if you have received the notebook from someone else or downloaded it from a repository. The person who made the notebook probably expects you to run the cells in the order given.
However, you are free to run cells in any order you like. Just select any cell and run it (using the menu items or the toolbar icon). Then run any other cell. This is great for experimenting with your code. But be careful. The computer responds to each cell as you run them. So, for instance if you run cell 10 that assigns variable “x” to value 100, when you go back to cell 5, say, the computer will still remember that x is equal to 100.
Coding Questions
Watch this video on handling errors in Jupyter notebooks. Most errors are caused by something being typed wrong. Read the code again, and check for obvious mistakes.
- Did you spell all the words correctly?
- Do you have the punctuation correct? Punctuation such as brackets, periods, commas, and colons are all important. Make sure none are missing, and you are using the right type of punctuation.
- Are there capital letters where they need to be, or did you put some extra ones in? Python pays attention to capitalization;”Print” is a different command than “print”.
- Did you miss putting some “space” onto your code? Some code pieces need space in the right place. For instance, in a “For” loop, all the lines after the first one need space at the beginning. Python will show an error message if you don’t do this.
If all else fails, look at the error message that Python prints out to get a hint about what went wrong. (more on this below).
This is like a punctuation error, or an error in the format of your code. If a comma or period is missing, or a bracket is in the wrong place, Python will highlight this as a syntax error. Like most programming languages, Python is fairly rigid in the format it expects the code to be written in.
Python has three types of brackets:
- Round brackets (parentheses): used in math formulas like
2*(3+4)
, also used in calling a function likeprint(5)
, and finally in creating a tuple of objects like(1,2,3)
. - Square brackets [brackets]: used to create lists, like
['one','two','three']
or to select an item in a list, likeList[3]
. - Curly brackets {braces}: used to define dictionaries, like
{"a" : "Apple", "b" : "Banana"}
.
Most importantly, brackets must always come in pairs: an opening bracket like “(” must be followed by a closing bracket like “)” at some point in the code. If you miss one of the pair, Python will report a syntax error.
There is no difference. You can use them interchangeably. However, in Python they must always appear in matching pairs.
• "Apple"
and 'Apple'
are both correct in Python. But "Apple'
will cause a syntax error, as the quotes don’t match.
• Having two types of quotes is useful when you need to create a string that has a quotation mark or apostrophe in it. For example: "This isn't a long example"
is a string that contains an apostrophe (a single quote) within the text.
When Python sees an error, it will print out an error messages underneath your code cell. Error messages in Python are long. A good approach is to read the first line and last line of the error message to see if it gives you a clue as to what is wrong. The error message will tell you exactly what line of code is causing the error. If you don’t see line numbers in your code, try selecting the menu item “View/Toggle Line Numbers.”
A syntax error usually means something is not typed correctly, or that there is a missing colon or other punctuation, etc. An error like "Name 'Print' is not defined"
often means you typed in the name wrong or are trying to use a function from a library but got the details wrong. Check the capitalization as well.
A coding library refers to a collection of functions and data that someone has written for you to use. Coding libraries are also called coding modules.
There are many specialized libraries such as:
- Numpy (Numerical Python): developed for numerical problems
- Plotly: used to plot graphical information
- Pandas: used to transform data, such as creating a DataFrame.
To use a library, you must first import it into your code. For instance, to use the trig function “sine” in the numpy library, we first import numpy, then call the function.
import numpy
print(numpy.sin(.12))
Notice when we use a function from the library, we need to indicate both the library name and the function name, as in numpy.sin()
. There are so many libraries available that we cannot list them here. Look here for more details: https://wiki.python.org/moin/UsefulModules
Yes. We can use an alias, like this:
import numpy as np
print(np.sin(.12))
Notice we only have to type “np” to refer to the numpy library.
Yes. Here is how we import the trig function “sin” and use it by itself:
from numpy import sin
print( sin(.12) )
Notice we do not type “numpy” or “np” when calling the sin()
function.
To load a file into Python, usually you need to use a function from a library. For instance, here is how we read in a csv file called “Colours.csv” (a spreadsheet) into a pandas dataframe:
from pandas import read_csv
colours_df = read_csv('Colours.csv')
Notice we had to import the “read_csv” function before we could use it. We just include the name of the file to load in the function call.
The “Colours.csv” file must be in the same directory, or folder, as your Jupyter notebook that runs the code. If it is in a subfolder, such as “myFolder”, you can indicate that in the function call, like this:
from pandas import read_csv
colours_df = read_csv('myFolder/Colours.csv')
Need A Quick Reference?
View our cheatsheet for markdown and Python.
STAY IN THE KNOW
Stay up to date with all things Callysto by subscribing to our newsletter.