Running Projects on Gitpod

Hi,

I have been trying to complete the projects for the python data analysis and visualisation credential course. However whenever I try to run my test modules and main.py files on the Gitpod boilerplate, I continually receive errors such as:

 /home/gitpod/.pyenv/shims/python /workspace/boilerplate-page-view-time-series-visualizer/test_module.py
  File "<stdin>", line 1
    /home/gitpod/.pyenv/shims/python /workspace/boilerplate-page-view-time-series-visualizer/test_module.py
    ^
SyntaxError: invalid syntax

and

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/workspace/.pyenv_mirror/user/current/lib/python3.8/site-packages/seaborn/categorical.py", line 3146, in barplot
    plotter = _BarPlotter(x, y, hue, data, order, hue_order,
  File "/workspace/.pyenv_mirror/user/current/lib/python3.8/site-packages/seaborn/categorical.py", line 1606, in __init__
    self.establish_variables(x, y, hue, data, orient,
  File "/workspace/.pyenv_mirror/user/current/lib/python3.8/site-packages/seaborn/categorical.py", line 203, in establish_variables
    group_names = categorical_order(groups, order)
  File "/workspace/.pyenv_mirror/user/current/lib/python3.8/site-packages/seaborn/utils.py", line 533, in categorical_order
    np.asarray(values).astype(np.float)
  File "/workspace/.pyenv_mirror/user/current/lib/python3.8/site-packages/numpy/__init__.py", line 305, in __getattr__
    raise AttributeError(__former_attrs__[attr])
AttributeError: module 'numpy' has no attribute 'float'.
`np.float` was a deprecated alias for the builtin `float`. To avoid this error in existing code, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

I’m not sure if I’m using Gitpod incorrectly or something or the provided workspaces need updating due to the numpy seaborn discrepancies.

Many thanks

Also when test running the functions in my code, I get the error:

>>> def draw_bar_plot():
... 
  File "<stdin>", line 2
    
    ^
IndentationError: expected an indented block

This is related to the test suite using np.float which has been deprecated. You can try downgrading numpy to a previous version using this command:

pip install --force-reinstall numpy==1.20.3

I think this version might work well.