title: Receiving "bad character range" error from Google Cloud SDK
body: <p>so I'm trying to add automatic backups to my minecraft server and I'm using a bash script that auto saves the world and puts it in cloud storage. Whenever I run the script, I get this error:</p>
  
  <p>raise error, v # invalid expression
  sre_constants.error: bad character range</p>
  
  <p>I have installed Python 3 after hearing that it is a Python 2.7 problem and the script runs 2.7 anyways with the same error.</p>
  
  <p>Python versions: 2.7.13 (used) and 3.5.3. Debian Linux</p>
  
  <p>The bash script:</p>
  
  <pre><code>#!/bin/bash
  screen -r mcs -X stuff '/save-all\n/save-off\n'
  /usr/bin/gsutil cp -R ${BASH_SOURCE%/*}/world gs://[terits-smp-minecraft-minecraft-backup]/$(date "+%Y%m%d-%H%M%S")-world
  screen -r mcs -X stuff '/save-on\n'
  </code></pre>
  
  <p>The full debug log:</p>
  
  <pre><code>Traceback (most recent call last):
    File "/usr/lib/google-cloud-sdk/platform/gsutil/gsutil", line 21, in &lt;module&gt;
      gsutil.RunMain()
    File "/usr/lib/google-cloud-sdk/platform/gsutil/gsutil.py", line 124, in RunMain
      sys.exit(gslib.__main__.main())
    File "/usr/lib/google-cloud-sdk/platform/gsutil/gslib/__main__.py", line 433, in main
      user_project=user_project)
    File "/usr/lib/google-cloud-sdk/platform/gsutil/gslib/__main__.py", line 762, in _RunNamedCommandAndHandleExceptions
      _HandleUnknownFailure(e)
    File "/usr/lib/google-cloud-sdk/platform/gsutil/gslib/__main__.py", line 628, in _RunNamedCommandAndHandleExceptions
      user_project=user_project)
    File "/usr/lib/google-cloud-sdk/platform/gsutil/gslib/command_runner.py", line 411, in RunNamedCommand
      return_code = command_inst.RunCommand()
    File "/usr/lib/google-cloud-sdk/platform/gsutil/gslib/commands/cp.py", line 1162, in RunCommand
      copy_helper_opts.daisy_chain,
    File "/usr/lib/google-cloud-sdk/platform/gsutil/gslib/name_expansion.py", line 650, in __init__
      name_expansion_dest_tuple = next(self.name_expansion_dest_iter)
    File "/usr/lib/google-cloud-sdk/platform/gsutil/gslib/commands/cp.py", line 1093, in _ConstructNameExpansionIteratorDstTupleIterator
      logger=self.logger))
    File "/usr/lib/google-cloud-sdk/platform/gsutil/gslib/utils/copy_helper.py", line 1419, in ExpandUrlToSingleBlr
      logger=logger))
    File "/usr/lib/google-cloud-sdk/platform/gsutil/gslib/wildcard_iterator.py", line 161, in __iter__
      for bucket_listing_ref in self._ExpandBucketWildcards(bucket_fields=['id']):
    File "/usr/lib/google-cloud-sdk/platform/gsutil/gslib/wildcard_iterator.py", line 389, in _ExpandBucketWildcards
      prog = re.compile(regex)
    File "/usr/lib/python2.7/re.py", line 194, in compile
      return _compile(pattern, flags)
    File "/usr/lib/python2.7/re.py", line 251, in _compile
      raise error, v # invalid expression
  sre_constants.error: bad character range
  </code></pre>
  
  <p>I have been using this guide so far to help me since I am not too savvy with google cloud:
  <a href="https://cloud.google.com/solutions/gaming/minecraft-server#schedule_backups" rel="nofollow noreferrer">https://cloud.google.com/solutions/gaming/minecraft-server#schedule_backups</a></p>