carpentries / lesson-example

Example lesson using The Carpentries lesson template.
https://carpentries.github.io/lesson-example/
Other
64 stars 173 forks source link

Travis CI failing: subprocess.Popen has no argument 'encoding' #297

Closed willfurnass closed 3 years ago

willfurnass commented 4 years ago

With commit 3107239 (latest commit on gh-pages branch):

The command "bundle install" exited with 0.
0.14s$ make lesson-check-all
Traceback (most recent call last):
  File "bin/lesson_check.py", line 566, in <module>
    main()
  File "bin/lesson_check.py", line 116, in main
    check_source_rmd(args.reporter, args.source_dir, args.parser)
  File "bin/lesson_check.py", line 201, in check_source_rmd
    data = read_markdown(parser, f)
  File "/home/travis/build/carpentries/lesson-example/bin/util.py", line 120, in read_markdown
    close_fds=True, universal_newlines=True, encoding='utf-8')
TypeError: __init__() got an unexpected keyword argument 'encoding'

Think this may be due to the encoding kw arg being introduced in Python 3.6 but Ubuntu 16.04, as used by the Travis CI jobs, shipping with Python 3.5.

maxim-belkin commented 4 years ago

Thanks for the report, Will! We indeed need Python 3.6+. Could you please check if adding something like

python: 
 - 3.6

or python: 3.6 to the .travis.yml file (and removing python3.5 python3-pip from line 34) solves the problem?

willfurnass commented 4 years ago

That didn't work (possibly due to language: r below?) Subsequently tried switching to dist: bionic but now having problems with installing R...

maxim-belkin commented 4 years ago

@fmichonneau created #299 which will sync the .travis.yml in this repository with the one in carpentries/styles. You might want to change the new file when #299 is merged.

fmichonneau commented 3 years ago

closing as stale as we are now using GitHub Action