8000 Failed to start due to an Error : botocore.exceptions.NoRegionError: You must specify a region. · Issue #9219 · home-assistant/core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Failed to start due to an Error : botocore.exceptions.NoRegionError: You must specify a region. #9219

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
nlamirault opened this issue Aug 30, 2017 · 3 comments · Fixed by #9844

Comments

@nlamirault
Copy link

I'm using HA on a Raspberry PI 3 using Docker image : homeassistant/raspberrypi3-homeassistant:0.51.2

Description of problem:

Failed to start

Expected:

Problem-relevant configuration.yaml entries and steps to reproduce:

homeassistant:
  # Name of the location where Home Assistant is running
  name: Home
  # Location required to calculate the time the sun rises and sets
  latitude: !secret latitude
  longitude: !secret longitude
  # Impacts weather/sunrise data (altitude above sea level in meters)
  elevation: 15
  # C for Celcius, F for Fahrenheit
  temperature_unit: C
  # metric for Metric, imperial for Imperial
  unit_system: metric
  # Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
  time_zone: Europe/Paris

  # Customization names, icons
  # customize: !include_dir_merge_named customize

# Show links to resources in log and frontend
introduction:

# Enables the frontend
frontend:
# Enables configuration UI
config:

http:
  # Uncomment this to add a password (recommended!)
  # api_password: !secret ha_password
  # Uncomment this if you are using SSL or running in Docker etc
  # base_url: example.duckdns.org:8123

# Checks for available updates
# Note: This component will send some information about your system to
# the developers to assist with development of Home Assistant.
# For more information, please see:
# https://home-assistant.io/blog/2016/10/25/explaining-the-updater/
updater:
  # Optional, allows Home Assistant developers to focus on popular components.
  # include_used_components: true

# Discover some devices automatically
discovery:
# Allows you to issue voice commands from the frontend in enabled browsers
conversation:

# Enables support for tracking state changes over time.
history:

# View all events in a logbook
logbook:

# Text to speech
tts:
  platform: google

# Log
logger: !include logger.yaml

recorder: !include recorder.yaml

# Enable Prometheus metrics (/api/prometheus)
prometheus:
# Store to InfluxDB
influxdb:
  host: !secret influxdb_host
  port: 8086
  database: home_assistant
  username: !secret influxdb_username
  password: !secret influxdb_password
  ssl: false
  verify_ssl: false
  default_measurement: state
  tags:
    source: jarvis

######################################
#
#             Include ext files
#
######################################

# mqtt: !include mqtt.yaml
ifttt: !include ifttt.yaml
telegram_bot: !include telegram_bot.yaml

xiaomi: !include xiaomi.yaml

group: !include_dir_named groups

automation: !include_dir_merge_list automations

script: !include_dir_named scripts

# google: !include google_oauth.yaml

media_player: !include_dir_list media_players

notify: !include_dir_list notify
device_tracker: !include_dir_list device_trackers

sensor: !include_dir_merge_list sensors

switch: !include_dir_list switches

weather: !include_dir_list weather

zone: !include_dir_list zones

input_select: !include_dir_named input_select

Traceback (if applicable):

Additional info:

Logs :

$ docker-compose up homeassistant
Starting homeassistant
Attaching to homeassistant
homeassistant    | starting version 3.2.2
homeassistant    | 2017-08-30 08:40:39 INFO (SyncWorker_0) [botocore.vendored.requests.packages.urllib3.connectionpool] Starting new HTTP connection (1): 169.254.169.254
homeassistant    | Traceback (most recent call last):
homeassistant    |   File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
homeassistant    |     "__main__", mod_spec)
homeassistant    |   File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
homeassistant    |     exec(code, run_globals)
homeassistant    |   File "/usr/lib/python3.6/site-packages/homeassistant/__main__.py", line 367, in <module>
homeassistant    |     sys.exit(main())
homeassistant    |   File "/usr/lib/python3.6/site-packages/homeassistant/__main__.py", line 359, in main
homeassistant    |     exit_code = setup_and_run_hass(config_dir, args)
homeassistant    |   File "/usr/lib/python3.6/site-packages/homeassistant/__main__.py", line 265, in setup_and_run_hass
homeassist
8000
ant    |     log_rotate_days=args.log_rotate_days)
homeassistant    |   File "/usr/lib/python3.6/site-packages/homeassistant/bootstrap.py", line 168, in from_config_file
homeassistant    |     config_path, hass, verbose, skip_pip, log_rotate_days)
homeassistant    |   File "uvloop/loop.pyx", line 1203, in uvloop.loop.Loop.run_until_complete (uvloop/loop.c:25629)
homeassistant    |   File "/usr/lib/python3.6/asyncio/futures.py", line 244, in result
homeassistant    |     raise self._exception
homeassistant    |   File "/usr/lib/python3.6/asyncio/tasks.py", line 181, in _step
homeassistant    |     result = coro.throw(exc)
homeassistant    |   File "/usr/lib/python3.6/site-packages/homeassistant/bootstrap.py", line 194, in async_from_config_file
homeassistant    |     conf_util.load_yaml_config_file, config_path)
homeassistant    |   File "/usr/lib/python3.6/asyncio/futures.py", line 331, in __iter__
homeassistant    |     yield self  # This tells Task to wait for completion.
homeassistant    |   File "/usr/lib/python3.6/asyncio/tasks.py", line 244, in _wakeup
homeassistant    |     future.result()
homeassistant    |   File "/usr/lib/python3.6/asyncio/futures.py", line 244, in result
homeassistant    |     raise self._exception
homeassistant    |   File "/usr/lib/python3.6/concurrent/futures/thread.py", line 55, in run
homeassistant    |     result = self.fn(*self.args, **self.kwargs)
homeassistant    |   File "/usr/lib/python3.6/site-packages/homeassistant/config.py", line 266, in load_yaml_config_file
homeassistant    |     conf_dict = load_yaml(config_path)
homeassistant    |   File "/usr/lib/python3.6/site-packages/homeassistant/util/yaml.py", line 70, in load_yaml
homeassistant    |     return yaml.load(conf_file, Loader=SafeLineLoader) or OrderedDict()
homeassistant    |   File "/usr/lib/python3.6/site-packages/yaml/__init__.py", line 72, in load
homeassistant    |     return loader.get_single_data()
homeassistant    |   File "/usr/lib/python3.6/site-packages/yaml/constructor.py", line 37, in get_single_data
homeassistant    |     return self.construct_document(node)
homeassistant    |   File "/usr/lib/python3.6/site-packages/yaml/constructor.py", line 41, in construct_document
homeassistant    |     data = self.construct_object(node)
homeassistant    |   File "/usr/lib/python3.6/site-packages/yaml/constructor.py", line 86, in construct_object
homeassistant    |     data = constructor(self, node)
homeassistant    |   File "/usr/lib/python3.6/site-packages/homeassistant/util/yaml.py", line 171, in _ordered_dict
homeassistant    |     nodes = loader.construct_pairs(node)
homeassistant    |   File "/usr/lib/python3.6/site-packages/yaml/constructor.py", line 141, in construct_pairs
homeassistant    |     value = self.construct_object(value_node, deep=deep)
homeassistant    |   File "/usr/lib/python3.6/site-packages/yaml/constructor.py", line 86, in construct_object
homeassistant    |     data = constructor(self, node)
homeassistant    |   File "/usr/lib/python3.6/site-packages/homeassistant/util/yaml.py", line 148, in _include_dir_list_yaml
homeassistant    |     return [load_yaml(f) for f in _find_files(loc, '*.yaml')
homeassistant    |   File "/usr/lib/python3.6/site-packages/homeassistant/util/yaml.py", line 149, in <listcomp>
homeassistant    |     if os.path.basename(f) != _SECRET_YAML]
homeassistant    |   File "/usr/lib/python3.6/site-packages/homeassistant/util/yaml.py", line 70, in load_yaml
homeassistant    |     return yaml.load(conf_file, Loader=SafeLineLoader) or OrderedDict()
homeassistant    |   File "/usr/lib/python3.6/site-packages/yaml/__init__.py", line 72, in load
homeassistant    |     return loader.get_single_data()
homeassistant    |   File "/usr/lib/python3.6/site-packages/yaml/constructor.py", line 37, in get_single_data
homeassistant    |     return self.construct_document(node)
homeassistant    |   File "/usr/lib/python3.6/site-packages/yaml/constructor.py", line 41, in construct_document
homeassistant    |     data = self.construct_object(node)
homeassistant    |   File "/usr/lib/python3.6/site-packages/yaml/constructor.py", line 86, in construct_object
homeassistant    |     data = constructor(self, node)
homeassistant    |   File "/usr/lib/python3.6/site-packages/homeassistant/util/yaml.py", line 198, in _construct_seq
homeassistant    |     obj, = loader.construct_yaml_seq(node)
homeassistant    |   File "/usr/lib/python3.6/site-packages/yaml/constructor.py", line 393, in construct_yaml_seq
homeassistant    |     data.extend(self.construct_sequence(node))
homeassistant    |   File "/usr/lib/python3.6/site-packages/yaml/constructor.py", line 116, in construct_sequence
homeassistant    |     for child in node.value]
homeassistant    |   File "/usr/lib/python3.6/site-packages/yaml/constructor.py", line 116, in <listcomp>
homeassistant    |     for child in node.value]
homeassistant    |   File "/usr/lib/python3.6/site-packages/yaml/constructor.py", line 86, in construct_object
homeassistant    |     data = constructor(self, node)
homeassistant    |   File "/usr/lib/python3.6/site-packages/homeassistant/util/yaml.py", line 171, in _ordered_dict
homeassistant    |     nodes = loader.construct_pairs(node)
homeassistant    |   File "/usr/lib/python3.6/site-packages/yaml/constructor.py", line 141, in construct_pairs
homeassistant    |     value = self.construct_object(value_node, deep=deep)
homeassistant    |   File "/usr/lib/python3.6/site-packages/yaml/constructor.py", line 86, in construct_object
homeassistant    |     data = constructor(self, node)
homeassistant    |   File "/usr/lib/python3.6/site-packages/homeassistant/util/yaml.py", line 269, in _secret_yaml
homeassistant    |     pwd = credstash.getSecret(node.value, table=_SECRET_NAMESPACE)
homeassistant    |   File "/usr/lib/python3.6/site-packages/credstash.py", line 428, in getSecret
homeassistant    |     dynamodb = session.resource('dynamodb', region_name=region)
homeassistant    |   File "/usr/lib/python3.6/site-packages/boto3/session.py", line 389, in resource
homeassistant    |     aws_session_token=aws_session_token, config=config)
homeassistant    |   File "/usr/lib/python3.6/site-packages/boto3/session.py", line 263, in client
homeassistant    |     aws_session_token=aws_session_token, config=config)
homeassistant    |   File "/usr/lib/python3.6/site-packages/botocore/session.py", line 828, in create_client
homeassistant    |     client_config=config, api_version=api_version)
homeassistant    |   File "/usr/lib/python3.6/site-packages/botocore/client.py", line 69, in create_client
homeassistant    |     verify, credentials, scoped_config, client_config, endpoint_bridge)
homeassistant    |   File "/usr/lib/python3.6/site-packages/botocore/client.py", line 222, in _get_client_args
homeassistant    |     verify, credentials, scoped_config, client_config, endpoint_bridge)
homeassistant    |   File "/usr/lib/python3.6/site-packages/botocore/args.py", line 44, in get_client_args
homeassistant    |     endpoint_url, is_secure, scoped_config)
homeassistant    |   File "/usr/lib/python3.6/site-packages/botocore/args.py", line 101, in compute_client_args
homeassistant    |     service_name, region_name, endpoint_url, is_secure)
homeassistant    |   File "/usr/lib/python3.6/site-packages/botocore/client.py", line 295, in resolve
homeassistant    |     service_name, region_name)
homeassistant    |   File "/usr/lib/python3.6/site-packages/botocore/regions.py", line 122, in construct_endpoint
homeassistant    |     partition, service_name, region_name)
homeassistant    |   File "/usr/lib/python3.6/site-packages/botocore/regions.py", line 135, in _endpoint_for_partition
homeassistant    |     raise NoRegionError()
homeassistant    | botocore.exceptions.NoRegionError: You must specify a region.
@SchumyHao
Copy link
Contributor

Hi @nlamirault
Have you fixed this issue?
How to fix this ?

@fredsmith
Copy link
fredsmith commented Sep 7, 2017

@SchumyHao I ran into this exact same error, and it was due to a secret variable declaration being misspelled. I had used !secret ifttt_key in my config, and iftt_key: 'foo' in secrets.yaml. fixing the typo made the error go away.

@nlamirault
Copy link
Author

Same mistake for me

@home-assistant home-assistant locked and limited conversation to collaborators Dec 11, 2017
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
0