Skip to content
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

Installing loredash #4

Closed
odow opened this issue Nov 17, 2020 · 5 comments · Fixed by #5
Closed

Installing loredash #4

odow opened this issue Nov 17, 2020 · 5 comments · Fixed by #5

Comments

@odow
Copy link
Collaborator

odow commented Nov 17, 2020

@Matthew-Boyd a few things

  1. I think I need permission to access matthewtboyd/lore:
(basic_3.8) oscar@Oscars-MBP lore-docker % docker pull matthewtboyd/lore:latest
Error response from daemon: pull access denied for matthewtboyd/lore, repository does not exist or may require 'docker login': denied: requested access to the resource is denied

My docker hub account is odow: https://hub.docker.com/u/odow

  1. I have a linux VM on my MacBook, but I get errors trying to create the database:
(loredash) parallels@parallels-Parallels-Virtual-Platform:~/Documents/lore/loredash$ python manage.py migrate
Traceback (most recent call last):
  File "manage.py", line 21, in <module>
    main()
  File "manage.py", line 17, in main
    execute_from_command_line(sys.argv)
  File "/home/parallels/anaconda3/envs/loredash/lib/python3.8/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
    utility.execute()
  File "/home/parallels/anaconda3/envs/loredash/lib/python3.8/site-packages/django/core/management/__init__.py", line 357, in execute
    django.setup()
  File "/home/parallels/anaconda3/envs/loredash/lib/python3.8/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/home/parallels/anaconda3/envs/loredash/lib/python3.8/site-packages/django/apps/registry.py", line 122, in populate
    app_config.ready()
  File "/home/parallels/Documents/lore/loredash/mediator/apps.py", line 13, in ready
    mediator = mediator.Mediator()
  File "/home/parallels/Documents/lore/loredash/mediator/mediator.py", line 22, in __init__
    maps = self.pysam_wrap.ReadMaps()
(loredash) parallels@parallels-Parallels-Virtual-Platform:~/Documents/lore/loredash$ python ./data/import_data.py ./data
Using data file path: /home/parallels/Documents/lore/loredash/data
? Select which SQLite3 database to import to:  (Use arrow keys)                                                                                                                                            
Traceback (most recent call last):
  File "/home/parallels/anaconda3/envs/loredash/lib/python3.8/site-packages/prompt_toolkit/cache.py", line 34, in get
    return self._data[key]
KeyError: 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./data/import_data.py", line 51, in <module>
    answers = prompt(questions)
  File "/home/parallels/anaconda3/envs/loredash/lib/python3.8/site-packages/PyInquirer/prompt.py", line 69, in prompt
    answer = run_application(
  File "/home/parallels/anaconda3/envs/loredash/lib/python3.8/site-packages/prompt_toolkit/shortcuts.py", line 625, in run_application
    result = cli.run()
  File "/home/parallels/anaconda3/envs/loredash/lib/python3.8/site-packages/prompt_toolkit/interface.py", line 413, in run
    self._redraw()
  File "/home/parallels/anaconda3/envs/loredash/lib/python3.8/site-packages/prompt_toolkit/interface.py", line 358, in _redraw
    self.renderer.render(self, self.layout, is_done=self.is_done)
  File "/home/parallels/anaconda3/envs/loredash/lib/python3.8/site-packages/prompt_toolkit/renderer.py", line 424, in render
    layout.write_to_screen(cli, screen, mouse_handlers, WritePosition(
  File "/home/parallels/anaconda3/envs/loredash/lib/python3.8/site-packages/prompt_toolkit/layout/containers.py", line 142, in write_to_screen
    sizes = self._divide_heigths(cli, write_position)
  File "/home/parallels/anaconda3/envs/loredash/lib/python3.8/site-packages/prompt_toolkit/layout/containers.py", line 177, in _divide_heigths
    dimensions = [get_dimension_for_child(c, index) for index, c in enumerate(self.children)]
  File "/home/parallels/anaconda3/envs/loredash/lib/python3.8/site-packages/prompt_toolkit/layout/containers.py", line 177, in <listcomp>
    dimensions = [get_dimension_for_child(c, index) for index, c in enumerate(self.children)]
  File "/home/parallels/anaconda3/envs/loredash/lib/python3.8/site-packages/prompt_toolkit/layout/containers.py", line 175, in get_dimension_for_child
    return c.preferred_height(cli, write_position.width, write_position.extended_height)
  File "/home/parallels/anaconda3/envs/loredash/lib/python3.8/site-packages/prompt_toolkit/layout/containers.py", line 1652, in preferred_height
    return self.content.preferred_height(cli, width, max_available_height)
  File "/home/parallels/anaconda3/envs/loredash/lib/python3.8/site-packages/prompt_toolkit/layout/containers.py", line 999, in preferred_height
    preferred=self.content.preferred_height(
  File "/home/parallels/anaconda3/envs/loredash/lib/python3.8/site-packages/prompt_toolkit/layout/controls.py", line 254, in preferred_height
    content = self.create_content(cli, width, None)
  File "/home/parallels/anaconda3/envs/loredash/lib/python3.8/site-packages/prompt_toolkit/layout/controls.py", line 259, in create_content
    tokens_with_mouse_handlers = self._get_tokens_cached(cli)
  File "/home/parallels/anaconda3/envs/loredash/lib/python3.8/site-packages/prompt_toolkit/layout/controls.py", line 238, in _get_tokens_cached
    return self._token_cache.get(
  File "/home/parallels/anaconda3/envs/loredash/lib/python3.8/site-packages/prompt_toolkit/cache.py", line 37, in get
    value = getter_func()
  File "/home/parallels/anaconda3/envs/loredash/lib/python3.8/site-packages/prompt_toolkit/layout/controls.py", line 239, in <lambda>
    cli.render_counter, lambda: self.get_tokens(cli))
  File "/home/parallels/anaconda3/envs/loredash/lib/python3.8/site-packages/PyInquirer/prompts/list.py", line 103, in _get_choice_tokens
    tokens.pop()  # Remove last newline.
IndexError: pop from empty list

Any ideas?

@Matthew-Boyd
Copy link
Collaborator

@odow I just added you to the docker hub repo as a collaborator so you should now have access. I also just merged some changes and simplified the database import of mock data to address your second exception. Everything is building and running for me now, including the docker image, and I've pushed the latest image build to docker hub. Keep me posted with any more issues you find.

@odow
Copy link
Collaborator Author

odow commented Nov 18, 2020

I have the docker-hub build working. But did you push your changes? The last commit I see in lore was 8 days ago.

@Matthew-Boyd
Copy link
Collaborator

Matthew-Boyd commented Nov 18, 2020 via email

@odow
Copy link
Collaborator Author

odow commented Dec 2, 2020

Do I need the sqlite file?

(loredash) parallels@parallels-Parallels-Virtual-Platform:~/Documents/lore/loredash$ git status
On branch develop
Your branch is up to date with 'origin/develop'.

nothing to commit, working tree clean

(loredash) parallels@parallels-Parallels-Virtual-Platform:~/Documents/lore/loredash$ python manage.py migrate
Traceback (most recent call last):
  File "manage.py", line 21, in <module>
    main()
  File "manage.py", line 17, in main
    execute_from_command_line(sys.argv)
  File "/home/parallels/anaconda3/envs/loredash/lib/python3.8/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
    utility.execute()
  File "/home/parallels/anaconda3/envs/loredash/lib/python3.8/site-packages/django/core/management/__init__.py", line 375, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/parallels/anaconda3/envs/loredash/lib/python3.8/site-packages/django/core/management/base.py", line 323, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/home/parallels/anaconda3/envs/loredash/lib/python3.8/site-packages/django/core/management/base.py", line 361, in execute
    self.check()
  File "/home/parallels/anaconda3/envs/loredash/lib/python3.8/site-packages/django/core/management/base.py", line 387, in check
    all_issues = self._run_checks(
  File "/home/parallels/anaconda3/envs/loredash/lib/python3.8/site-packages/django/core/management/commands/migrate.py", line 65, in _run_checks
    issues.extend(super()._run_checks(**kwargs))
  File "/home/parallels/anaconda3/envs/loredash/lib/python3.8/site-packages/django/core/management/base.py", line 377, in _run_checks
    return checks.run_checks(**kwargs)
  File "/home/parallels/anaconda3/envs/loredash/lib/python3.8/site-packages/django/core/checks/registry.py", line 72, in run_checks
    new_errors = check(app_configs=app_configs)
  File "/home/parallels/anaconda3/envs/loredash/lib/python3.8/site-packages/django/core/checks/urls.py", line 13, in check_url_config
    return check_resolver(resolver)
  File "/home/parallels/anaconda3/envs/loredash/lib/python3.8/site-packages/django/core/checks/urls.py", line 23, in check_resolver
    return check_method()
  File "/home/parallels/anaconda3/envs/loredash/lib/python3.8/site-packages/django/urls/resolvers.py", line 398, in check
    for pattern in self.url_patterns:
  File "/home/parallels/anaconda3/envs/loredash/lib/python3.8/site-packages/django/utils/functional.py", line 80, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "/home/parallels/anaconda3/envs/loredash/lib/python3.8/site-packages/django/urls/resolvers.py", line 579, in url_patterns
    patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
  File "/home/parallels/anaconda3/envs/loredash/lib/python3.8/site-packages/django/utils/functional.py", line 80, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "/home/parallels/anaconda3/envs/loredash/lib/python3.8/site-packages/django/urls/resolvers.py", line 572, in urlconf_module
    return import_module(self.urlconf_name)
  File "/home/parallels/anaconda3/envs/loredash/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/parallels/Documents/lore/loredash/loredash/urls.py", line 30, in <module>
    mediator = mediator.Mediator(override_with_weather_file_location=True,
  File "/home/parallels/Documents/lore/loredash/mediation/mediator.py", line 33, in __init__
    self.pysam_wrap = pysam_wrap.PysamWrap(plant_config=self.plant_config, model_name=self.default_pysam_model,
  File "/home/parallels/Documents/lore/loredash/mediation/pysam_wrap.py", line 33, in __init__
    self.PreProcess()                                   # do this now so no simulation delay later
  File "/home/parallels/Documents/lore/loredash/mediation/pysam_wrap.py", line 37, in PreProcess
    solar_resource_data = PysamWrap.GetSolarResourceDataTemplate(plant_location=self.plant_config.location)
AttributeError: 'dict' object has no attribute 'location'

(loredash) parallels@parallels-Parallels-Virtual-Platform:~/Documents/lore/loredash$ python ./data/import_data.py ./data/
Using data file path: /home/parallels/Documents/lore/loredash/data
Writing to ui_forecastsmarketdata...
Traceback (most recent call last):
  File "./data/import_data.py", line 80, in <module>
    cur.executemany('insert into ' + table + ' (id, timestamp, market_forecast, ci_plus, ci_minus) values (?,?,?,?,?);', data_to_db)
sqlite3.OperationalError: no such table: ui_forecastsmarketdata

@Matthew-Boyd
Copy link
Collaborator

Matthew-Boyd commented Dec 3, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants