Fortran-FOSS-Programmers / ford

Automatically generates FORtran Documentation from comments within the code.
https://forddocs.readthedocs.io
GNU General Public License v3.0
405 stars 131 forks source link

TypeError: 'PosixPath' object is not iterable #566

Closed SharpRT closed 11 months ago

SharpRT commented 11 months ago

Hi,

I am new to FORD. Trying out the getting started example (https://forddocs.readthedocs.io/en/latest/user_guide/getting_started.html) but am getting this error:

.../test$ ford my_project.md
Traceback (most recent call last):
  File "/home/sharpr/.local/bin/ford", line 5, in <module>
    from ford import run
  File "/home/sharpr/.local/lib/python3.8/site-packages/ford/__init__.py", line 41, in <module>
    import ford.output
  File "/home/sharpr/.local/lib/python3.8/site-packages/ford/output.py", line 43, in <module>
    loader=jinja2.FileSystemLoader(loc / "templates"),
  File "/usr/lib/python3/dist-packages/jinja2/loaders.py", line 163, in __init__
    self.searchpath = list(searchpath)
TypeError: 'PosixPath' object is not iterable

I am calling this from a test folder containing my_project.md & src/hello.f90.

To install I used: sudo apt-get install python3-pip python-dev build-essential (from https://github.com/Fortran-FOSS-Programmers/ford/issues/167, python-pip didn't work so used the suggested python3-pip)

pip install ford (from https://forddocs.readthedocs.io/en/latest/index.html#sec-installation)

I am running this on Ubuntu 20.04.4 LTS.

Any ideas?

ZedThree commented 11 months ago

Hi @SharpRT, sorry you've been having problems! I think the issue is that we use something from Jinja 2.11 and you'll only have 2.10 installed. If you do pip install --upgrade Jinja2, then hopefully that will fix things. I'll make sure to bump our minimum required version so this doesn't happen to other people!

SharpRT commented 11 months ago

That did it, thanks!