Skip to content
This repository was archived by the owner on Sep 15, 2022. It is now read-only.
This repository was archived by the owner on Sep 15, 2022. It is now read-only.

alueError: Bucket names must start and end with a number or letter. #22

@Kehrenkamp

Description

@Kehrenkamp

Hello,

can you help me to fix this problem?
`python3 app.py

  • Serving Flask app 'app' (lazy loading)
  • Environment: production
    WARNING: This is a development server. Do not use it in a production deployment.
    Use a production WSGI server instead.
  • Debug mode: on
  • Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
  • Restarting with stat
  • Debugger is active!
  • Debugger PIN: 106-248-837
    127.0.0.1 - - [08/Sep/2021 22:27:29] "GET / HTTP/1.1" 404 -
    127.0.0.1 - - [08/Sep/2021 22:27:33] "GET / HTTP/1.1" 404 -
    127.0.0.1 - - [08/Sep/2021 22:27:35] "GET / HTTP/1.1" 404 -
    127.0.0.1 - - [08/Sep/2021 22:27:35] "GET /api/creature/2 HTTP/1.1" 500 -
    Traceback (most recent call last):
    File "/Users/Kehrenkamp/Library/Python/3.8/lib/python/site-packages/flask/app.py", line 2088, in call
    return self.wsgi_app(environ, start_response)
    File "/Users/Kehrenkamp/Library/Python/3.8/lib/python/site-packages/flask/app.py", line 2073, in wsgi_app
    response = self.handle_exception(e)
    File "/Users/Kehrenkamp/Library/Python/3.8/lib/python/site-packages/flask/app.py", line 2070, in wsgi_app
    response = self.full_dispatch_request()
    File "/Users/Kehrenkamp/Library/Python/3.8/lib/python/site-packages/flask/app.py", line 1515, in full_dispatch_request
    rv = self.handle_user_exception(e)
    File "/Users/Kehrenkamp/Library/Python/3.8/lib/python/site-packages/flask/app.py", line 1513, in full_dispatch_request
    rv = self.dispatch_request()
    File "/Users/Kehrenkamp/Library/Python/3.8/lib/python/site-packages/flask/app.py", line 1499, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
    File "/Users/Kehrenkamp/Desktop/metadata-api-python-master/app.py", line 45, in creature
    image_url = _compose_image(['images/bases/base-%s.png' % base,
    File "/Users/Kehrenkamp/Desktop/metadata-api-python-master/app.py", line 145, in _compose_image
    blob = _get_bucket().blob(f"{path}/{token_id}.png")
    File "/Users/Kehrenkamp/Desktop/metadata-api-python-master/app.py", line 155, in _get_bucket
    return client.get_bucket(GOOGLE_STORAGE_BUCKET)
    File "/Users/Kehrenkamp/Library/Python/3.8/lib/python/site-packages/google/cloud/storage/client.py", line 762, in get_bucket
    bucket = self._bucket_arg_to_bucket(bucket_or_name)
    File "/Users/Kehrenkamp/Library/Python/3.8/lib/python/site-packages/google/cloud/storage/client.py", line 241, in _bucket_arg_to_bucket
    bucket = Bucket(self, name=bucket_or_name)
    File "/Users/Kehrenkamp/Library/Python/3.8/lib/python/site-packages/google/cloud/storage/bucket.py", line 611, in init
    name = _validate_name(name)
    File "/Users/Kehrenkamp/Library/Python/3.8/lib/python/site-packages/google/cloud/storage/_helpers.py", line 81, in _validate_name
    raise ValueError("Bucket names must start and end with a number or letter.")
    ValueError: Bucket names must start and end with a number or letter.`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions