15

I used google compute engine from Google Cloud Platform , and I want to store my data in googles storage, so I used the gsutil to send data from compute engine to google storage

Before i updated python2.6.6 to python2.7, gsutil was working fine. But after update to 2.7

enter image description here

it took me lots of time...

P.S I use CenOS6.7

HiDeoo
  • 10,353
  • 8
  • 47
  • 47
Shiue-yang Shiau
  • 171
  • 1
  • 1
  • 6

3 Answers3

35

I had exactly the same problem, and I solved it by removing boto settings:

sudo rm -f /etc/boto.cfg
tashuhka
  • 5,028
  • 4
  • 45
  • 64
17

This is related to this issue.

Can be solved by running export BOTO_CONFIG=/dev/null before running gsutil

Alex Simenduev
  • 846
  • 7
  • 6
5

This worked for me:

vim /etc/boto.cfg

Find the directive where it says:

[Plugin]
plugin_directory = /usr/lib/python3/dist-packages/google_compute_engine/boto

And comment out the plugin_directory by placing the # at the start of the line:

[Plugin]
#plugin_directory = /usr/lib/python3/dist-packages/google_compute_engine/boto

Or, set the BOTO_CONFIG environment variable in the same command:

BOTO_CONFIG=/dev/null gsutil <your command here> ...

d-_-b
  • 21,536
  • 40
  • 150
  • 256
  • 3
    While this might work, it's not a durable solution, because the `/etc/boto.cfg` file contains an explicit warning at the top: "This file is automatically created at boot time [...] Do not edit this file directly" – TanguyP May 01 '19 at 09:28