A2 Voila PosixPath attribute 'tell' error

I’ve managed to fix the issue. The issue was cause by incorrect versions of different modules. If you are running your web app on Google Colab and then testing it locally with Voila and get errors, you need to check that the versions of the modules/Python match locally and in Google Colab. At the time I’m running this, Google Colab is using Python version 3.6.9, Pytorch version 1.6.0, and Torchvision 0.7.0.

To check the version of Python in Google Colab’s python notebook, you can do sys.version. To check the version of a module, you can do help('packageName'). For example, to check jupyter’s version, you would write help('jupyter').

I installed everything locally in Conda and found that it would stay with Pytorch 1.4.0 and Torchvision 0.5.0 if I didn’t install it first, so install those two first. Here are the steps I used to create a conda environment that ensured that it installed the newer versions of pytorch and torchvision:
conda create -n fastai369 python=3.6.9
conda activate fastai369
conda install -c pytorch torchvision=0.7.0
conda install -c fastai fastai
conda install jupyter
conda install voila

To check the versions of the modules in your local conda python, you can do:
pip freeze
to list everything in the terminal, or
pip freeze > requirements.txt
to list everything in a text file.

1 Like