Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: _open() got an unexpected keyword argument 'pilmode' #268

Open
moldach opened this issue Mar 24, 2021 · 0 comments
Open

TypeError: _open() got an unexpected keyword argument 'pilmode' #268

moldach opened this issue Mar 24, 2021 · 0 comments

Comments

@moldach
Copy link

moldach commented Mar 24, 2021

I'm getting the following error:

2021-03-24 12:08:59.689159: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.11.0
Traceback (most recent call last):
  File "style.py", line 167, in <module>
    main()
  File "style.py", line 117, in main
    style_target = get_img(options.style)
  File "src/utils.py", line 18, in get_img
    img = imageio.imread(src, pilmode='RGB') # misc.imresize(, (256, 256, 3))
  File "/scratch/moldach/fst/tensorflow/lib/python3.8/site-packages/imageio/core/functions.py", line 185, in imread
    reader = read(uri, format, 'i', **kwargs)
  File "/scratch/moldach/fst/tensorflow/lib/python3.8/site-packages/imageio/core/functions.py", line 111, in get_reader
    return format.get_reader(request)
  File "/scratch/moldach/fst/tensorflow/lib/python3.8/site-packages/imageio/core/format.py", line 169, in get_reader
    return self.Reader(self, request)
  File "/scratch/moldach/fst/tensorflow/lib/python3.8/site-packages/imageio/core/format.py", line 218, in __init__
    self._open(**self.request.kwargs.copy())
TypeError: _open() got an unexpected keyword argument 'pilmode'
~

From this style.py:

#!/bin/bash
#SBATCH --gres=gpu:1        # request GPU
#SBATCH --account=def-mtarailo
#SBATCH --cpus-per-task=1   # maximum CPU cores per GPU request
#SBATCH --time=00:20:00     # request 8 hours of walltime
#SBATCH --mem=3G            # request 10G (or 1G per core)
#SBATCH --job-name="hen2"
#SBATCH --output=/scratch/moldach/fst/checkpoints/jobs/%x-%j.out  # %N for node name, %j for jobID
#SBATCH --error=/scratch/moldach/fst/checkpoints/jobs/%x-%j.err  # %N for node name, %j for jobID

### JOB SCRIPT BELLOW ###

# Load Modules
module load StdEnv/2020 cudacore/.11.0.2 cudnn/8.0.3
#module load scipy-stack
source tensorflow/bin/activate

python style.py \
    --style /scratch/moldach/fst/input/kandinsky.jpg   \
    --checkpoint-dir /scratch/moldach/fst/checkpoints/tulip_nebular  \
    --content-weight 1.5e1 \
    --checkpoint-iterations 1000 \
    --batch-size 20

And this tensorflow environment looks like:

pip freez:

(tensorflow) [moldach@beluga2 fst]$ pip freeze
DEPRECATION: --find-links option in pip freeze is deprecated. pip 21.2 will remove support for this functionality. You can find discussion regarding this at https://github.com/pypa/pip/issues/9069.
-f /cvmfs/soft.computecanada.ca/custom/python/wheelhouse/gentoo/avx512
-f /cvmfs/soft.computecanada.ca/custom/python/wheelhouse/gentoo/avx2
-f /cvmfs/soft.computecanada.ca/custom/python/wheelhouse/gentoo/generic
-f /cvmfs/soft.computecanada.ca/custom/python/wheelhouse/generic
absl-py==0.11.0
arff==0.9
argon2-cffi==20.1.0
astunparse==1.6.3
async-generator==1.10
attrs==20.2.0
backcall==0.2.0
backports-abc==0.5
backports.shutil-get-terminal-size==1.0.0
bcrypt==3.2.0
bitstring==3.1.7
bleach==3.2.1
blist==1.3.6
cachetools==4.2.1
certifi==2020.12.5
cffi==1.14.3
chardet==4.0.0
cryptography==3.1.1
cycler==0.10.0
Cython==0.29.21
deap==1.3.1
decorator==4.0.11
defusedxml==0.6.0
dnspython==2.0.0
ecdsa==0.16.0
entrypoints==0.3
flatbuffers==1.12
funcsigs==1.0.2
gast==0.3.3
google-auth==1.27.0
google-auth-oauthlib==0.4.2
google-pasta==0.2.0
grpcio==1.32.0
h5py==2.10.0
idna==2.10
imageio==2.1.2
importlib-metadata==2.0.0
ipykernel==5.3.4
ipython==7.18.1
ipython-genutils==0.2.0
ipywidgets==7.5.1
jedi==0.17.2
Jinja2==2.11.2
jsonschema==3.2.0
jupyter-client==6.1.7
jupyter-core==4.6.3
jupyterlab-pygments==0.1.2
Keras-Preprocessing==1.1.2
kiwisolver==1.2.0
lockfile==0.12.2
Markdown==3.3.4
MarkupSafe==1.1.1
matplotlib==3.3.2
mistune==0.8.4
mock==4.0.2
moviepy==0.2.3.2
mpmath==1.1.0
nbclient==0.5.0
nbconvert==6.0.7
nbformat==5.0.7
nest-asyncio==1.4.1
netaddr==0.8.0
netifaces==0.10.9
nose==1.3.7
notebook==6.1.4
numpy==1.19.1
oauthlib==3.1.0
opt-einsum==3.3.0
packaging==20.4
pandas==1.1.3
pandocfilters==1.4.2
paramiko==2.7.2
parso==0.7.0
path==15.0.0
path.py==12.5.0
pathlib2==2.3.5
paycheck==1.0.2
pbr==5.5.0
pexpect==4.8.0
pickleshare==0.7.5
Pillow==7.2.0
prometheus-client==0.8.0
prompt-toolkit==3.0.7
protobuf==3.15.3
ptyprocess==0.6.0
pyasn1==0.4.8
pyasn1-modules==0.2.8
pycparser==2.20
Pygments==2.7.1
PyNaCl==1.4.0
pyparsing==2.4.7
pyrsistent==0.17.3
python-dateutil==2.8.1
pytz==2020.1
pyzmq==19.0.2
requests==2.25.1
requests-oauthlib==1.3.0
rsa==4.7.2
scipy==1.5.2
Send2Trash==1.5.0
simplegeneric==0.8.1
singledispatch==3.4.0.3
six==1.15.0
sympy==1.6.2
tensorboard==2.4.1
tensorboard-plugin-wit==1.7.0
tensorflow-estimator==2.4.0
tensorflow-gpu==2.4.1
termcolor==1.1.0
terminado==0.9.1
testpath==0.4.4
tornado==6.0.4
tqdm==4.11.2
traitlets==5.0.4
typing-extensions==3.7.4.3
urllib3==1.26.4
wcwidth==0.2.5
webencodings==0.5.1
Werkzeug==1.0.1
widgetsnbextension==3.5.1
wrapt==1.12.1
zipp==3.3.0

The input file is here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant