ianmiell / shutit

Automation framework for programmers
http://ianmiell.github.io/shutit/
MIT License
2.15k stars 110 forks source link

TypeError: cannot concatenate 'str' and 'function' objects #313

Closed mamercad closed 6 years ago

mamercad commented 6 years ago
[vagrant@localhost bin]$ sudo ./copy_server.sh
/home/vagrant/shutit_copyserver /home/vagrant/shutit_copyserver/bin
2018-03-13 11:48:40,956 INFO: ShutIt modules loaded
2018-03-13 11:48:40,957 INFO: Configuration loaded
2018-03-13 11:48:42,611 INFO: Connected to target

Please input a value for shutit.shutit_copyserver.shutit_copyserver.shutit_copyserver.base_image

Please input an appropriate docker base image, eg:
ubuntu
ubuntu:12.04
centos

You can use any base image you want, but be aware that non-apt or yum-based images are less likely to succeed.:
centos
2018-03-13 11:48:50,372 INFO: Considering whether to build: shutit.tk.setup
2018-03-13 11:48:51,394 INFO: Building ShutIt module: shutit.tk.setup with run order: 0
2018-03-13 11:48:51,560 INFO: Considering whether to build: shutit.shutit_copyserver.shutit_copyserver.shutit_copyserver
2018-03-13 11:48:52,599 INFO: Building ShutIt module: shutit.shutit_copyserver.shutit_copyserver.shutit_copyserver with run order: 1161086295
2018-03-13 11:48:52,599 INFO: Matching output from: "whoami" to one of these regexps:root
2018-03-13 11:48:52,656 INFO: Installing package: python-pip
Traceback (most recent call last):
  File "/bin/shutit", line 11, in <module>
    sys.exit(main())
  File "/usr/lib/python2.7/site-packages/shutit.py", line 67, in main
    shutit.setup_shutit_obj()
  File "/usr/lib/python2.7/site-packages/shutit_class.py", line 3960, in setup_shutit_obj
    self.do_build()
  File "/usr/lib/python2.7/site-packages/shutit_class.py", line 4199, in do_build
    self.build_module(module)
  File "/usr/lib/python2.7/site-packages/shutit_class.py", line 4141, in build_module
    if not module.build(self):
  File "/usr/lib/python2.7/site-packages/shutit_module.py", line 59, in wrapper
    ret = func(self, shutit)
  File "/home/vagrant/shutit_copyserver/shutit_copyserver.py", line 66, in build
    shutit.install('python-pip')
  File "/usr/lib/python2.7/site-packages/shutit_class.py", line 1804, in install
    loglevel=loglevel)
  File "/usr/lib/python2.7/site-packages/shutit_pexpect.py", line 1404, in install
    package = package_map.map_packages(package, self.current_environment.install_type)
  File "/usr/lib/python2.7/site-packages/package_map.py", line 110, in map_packages
    res = res + ' ' + map_package(package,install_type)
TypeError: cannot concatenate 'str' and 'function' objects
/home/vagrant/shutit_copyserver/bin
[vagrant@localhost bin]$ cat /etc/redhat-release
CentOS Linux release 7.4.1708 (Core)
ianmiell commented 6 years ago

I have a workaround for the crash, but need to do a little more work to make this work.

ianmiell commented 6 years ago

I think this is fixed - the code around this was changed a while ago.