Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

TypeError: coercing to Unicode: need string or buffer, list found #7

Closed
wlgcqh opened this issue Oct 25, 2018 · 5 comments · Fixed by #11
Closed

TypeError: coercing to Unicode: need string or buffer, list found #7

wlgcqh opened this issue Oct 25, 2018 · 5 comments · Fixed by #11

Comments

@wlgcqh
Copy link

wlgcqh commented Oct 25, 2018

🐛 Bug

File "/home/workplace/opt/anaconda2/lib/python2.7/distutils/unixccompiler.py", line 121, in _compile
self.spawn(compiler_so + cc_args + [src, '-o', obj] +
TypeError: coercing to Unicode: need string or buffer, list found

To Reproduce

Steps to reproduce the behavior:

1.python setup.py build_ext install

Expected behavior

Environment

Please copy and paste the output from the
environment collection script from PyTorch
(or fill out the checklist below manually).

You can get the script and run it with:

wget https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py
# For security purposes, please check the contents of collect_env.py before running it.
python collect_env.py
  • PyTorch Version (e.g., 1.0): 1.0
  • OS (e.g., Linux):centos 7.0
  • How you installed PyTorch (conda, pip, source): source
  • Build command you used (if compiling from source): python setup.py build_ext install
  • Python version:2.7.14
  • CUDA/cuDNN version:9.0
  • GPU models and configuration:
  • Any other relevant information:

Additional context

@soumith
Copy link
Member

soumith commented Oct 25, 2018

I think we tested this only in Python3. We can test in Python 2.7 environment and push patches tomorrow.

@fmassa
Copy link
Contributor

fmassa commented Oct 25, 2018

Yes, our code currently have (very few) places where we assumed Python3 was available.
I'll push some fixes to make this Python2 compatible today

@fmassa
Copy link
Contributor

fmassa commented Oct 25, 2018

@wlgcqh I have the impression that your error message comes from the cocoapi compilation, and not from maskrcnn-benchmark?

I've just successfully compiled maskrcnn-benchmark using Python 2.7.

I expect some parts of the code not to work, but I'm working on fixing them now.

@wlgcqh
Copy link
Author

wlgcqh commented Oct 25, 2018

@wlgcqh I have the impression that your error message comes from the cocoapi compilation, and not from maskrcnn-benchmark?

I've just successfully compiled maskrcnn-benchmark using Python 2.7.

I expect some parts of the code not to work, but I'm working on fixing them now.

I have installed cocoapi

@fmassa
Copy link
Contributor

fmassa commented Oct 25, 2018

So why did you use the installation instructions from cocoapi to install the library?
You mentioned that you used python setup.py build_ext install , but for the library we use python setup.py build develop.

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

Successfully merging a pull request may close this issue.

3 participants