Closed odow closed 3 years ago
@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.
I have the docker-hub build working. But did you push your changes? The last commit I see in lore was 8 days ago.
Nope... Just pushed. Thanks.
On Wed, Nov 18, 2020 at 4:25 PM Oscar Dowson notifications@github.com wrote:
I have the docker-hub build working. But did you push your changes? The last commit I see in lore was 8 days ago.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/NREL/lore/issues/4#issuecomment-730009638, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHICFBZAMELIG47RRXREET3SQRJUTANCNFSM4TX74MHQ .
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
I don't think the sqlite file is the main problem, but yes, you do need this. This database file is first created by running: python manage.py migrate
Then the user-defined 'models' are translated into tables, and then those are migrated, by running: python manage.py makemigrations python manage.py migrate
Whenever there is a new table added, as shown by the last error in your capture, you need to run these two commands. And then related, if you haven't run the following to populate the database with the mock data, then now would be a good time to do that too: python ./data/import_data.py ./data
Lastly, there's another error here from line 37 in the pysam_wrap.py . I'm not sure why it is throwing for you and not me, but it should be an easy workaround if you investigate a little. This part isn't fully implemented but you should be able to use a default or generic plant location, and I believe a flag is set to use the weather file location anyway. Keep me posted, I can look into this tomorrow.
On Wed, Dec 2, 2020 at 4:04 PM Oscar Dowson notifications@github.com wrote:
Do I need the sqlite file?
(loredash) parallels@parallels-Parallels-Virtual-Platform:~/Documents/lore/loredash$ git statusOn branch developYour 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 migrateTraceback (most recent call last): File "manage.py", line 21, in
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 " ", line 1014, in _gcd_import File " ", line 991, in _find_and_load File " ", line 975, in _find_and_load_unlocked File " ", line 671, in _load_unlocked File " ", line 783, in exec_module File " ", line 219, in _call_with_frames_removed File "/home/parallels/Documents/lore/loredash/loredash/urls.py", line 30, in 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/dataWriting to ui_forecastsmarketdata...Traceback (most recent call last): File "./data/import_data.py", line 80, in
cur.executemany('insert into ' + table + ' (id, timestamp, market_forecast, ci_plus, ci_minus) values (?,?,?,?,?);', data_to_db)sqlite3.OperationalError: no such table: ui_forecastsmarketdata — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/NREL/lore/issues/4#issuecomment-737549063, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHICFB27ZVTNTRVFIJWWVUTSS3BZTANCNFSM4TX74MHQ .
@Matthew-Boyd a few things
I think I need permission to access
matthewtboyd/lore
:My docker hub account is
odow
: https://hub.docker.com/u/odowI have a linux VM on my MacBook, but I get errors trying to create the database:
Any ideas?