lcopt
lcopt copied to clipboard
Unable to Load previously saved Forwast Model
Hi James, Win 10 Jupyter Notebook platform, I developed and saved a Forwast model using GUI. But now I'm unable to Load it and resume working on the model.
''' from lcopt import * #model = LcoptModel('LCA of a T-shirt FORWAST Model', useForwast=True) model = LcoptModel(load='LCA of a T-shirt FORWAST Model') model.launch_interact()
'''
KeyError Traceback (most recent call last)
~\anaconda3\envs\lcopt\lib\site-packages\lcopt\model.py in launch_interact(self) 757 This is probably the most important method in the model - you use it to launch the GUI 758 """ --> 759 my_flask = FlaskSandbox(self) 760 my_flask.run() 761
~\anaconda3\envs\lcopt\lib\site-packages\lcopt\interact.py in init(self, modelInstance) 20 21 self.modelInstance = modelInstance ---> 22 self.get_sandbox_variables() 23 24 # Set up the dictionary of actions that can be processed by POST requests
~\anaconda3\envs\lcopt\lib\site-packages\lcopt\interact.py in get_sandbox_variables(self) 84 85 #process_output_name_map = {process_code: output_name for x in processes.keys()} ---> 86 process_output_name_map = {x[1]: intermediate_map[self.reverse_process_output_map[x[1]]] for x in processes.keys()} 87 88 inputs = OrderedDict((k, v) for k, v in products.items() if v['lcopt_type'] == 'input')
~\anaconda3\envs\lcopt\lib\site-packages\lcopt\interact.py in
KeyError: 'ad962cc98bdcbe9d4238a43e0fd38ea3'
Same Problem persists. I'm able to load simple Forwast Models, but not when it gets complicated (more processes) for some reason. Same keyerror.
Hi James, Unable to create FORWAST models.
127.0.0.1 - - [13/Oct/2020 13:54:04] "GET /functions?preload=p_9_0 HTTP/1.1" 200 -
127.0.0.1 - - [13/Oct/2020 13:54:04] "GET /status.json HTTP/1.1" 200 -
127.0.0.1 - - [13/Oct/2020 13:54:04] "GET /parameters.json HTTP/1.1" 200 -
127.0.0.1 - - [13/Oct/2020 13:54:04] "GET /parameter_p_9_0.json HTTP/1.1" 200 -
127.0.0.1 - - [13/Oct/2020 13:54:04] "GET /parameter_p_9_0.json HTTP/1.1" 200 -
[2020-10-13 13:54:24,533] ERROR in app: Exception on / [GET]
Traceback (most recent call last):
File "C:\Users\Zee\anaconda3\envs\lcopt\lib\site-packages\flask\app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "C:\Users\Zee\anaconda3\envs\lcopt\lib\site-packages\flask\app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "C:\Users\Zee\anaconda3\envs\lcopt\lib\site-packages\flask\app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "C:\Users\Zee\anaconda3\envs\lcopt\lib\site-packages\flask_compat.py", line 39, in reraise
raise value
File "C:\Users\Zee\anaconda3\envs\lcopt\lib\site-packages\flask\app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "C:\Users\Zee\anaconda3\envs\lcopt\lib\site-packages\flask\app.py", line 1936, in dispatch_request
return self.view_functionsrule.endpoint
File "C:\Users\Zee\anaconda3\envs\lcopt\lib\site-packages\lcopt\interact.py", line 744, in index
self.get_sandbox_variables()
File "C:\Users\Zee\anaconda3\envs\lcopt\lib\site-packages\lcopt\interact.py", line 86, in get_sandbox_variables
process_output_name_map = {x[1]: intermediate_map[self.reverse_process_output_map[x[1]]] for x in processes.keys()}
File "C:\Users\Zee\anaconda3\envs\lcopt\lib\site-packages\lcopt\interact.py", line 86, in
The same problem persists