tarcadius / LDAR_Sim

MIT License
8 stars 8 forks source link

No Credential Error: Unable to locate credentials #19

Closed aesparz closed 2 years ago

aesparz commented 3 years ago

Hi,

Today I tried to install and run LDAR Sim. I encountered an issue with the credentials. I hope you can assist with this issue.

I followed the instructions in the GitHub page. Once the environment was created, I ran the ldar_sim_main.py using Spyder (from Anaconda navigator). While running the file, I encounter the following error message:

image

Here is the entire text:

Python 3.7.9 | packaged by conda-forge | (default, Feb 13 2021, 19:28:53) [MSC v.1916 64 bit (AMD64)] Type "copyright", "credits" or "license" for more information.

IPython 7.21.0 -- An enhanced Interactive Python.

runfile('C:/Users/aesparza/Desktop/Sim/LDAR_Sim-master/LDAR_Sim-master/LDAR_Sim/model_code/ldar_sim_main.py', wdir='C:/Users/aesparza/Desktop/Sim/LDAR_Sim-master/LDAR_Sim-master/LDAR_Sim/model_code') Weather data not found. Downloading now from AWS you... Traceback (most recent call last):

File "C:\Users\aesparza\Desktop\Sim\LDAR_Sim-master\LDAR_Sim-master\LDAR_Sim\model_code\ldar_sim_main.py", line 61, in check_ERA5_file(wd, programs[0]['weather_file'])

File "C:\Users\aesparza\Desktop\Sim\LDAR_Sim-master\LDAR_Sim-master\LDAR_Sim\model_code\generic_functions.py", line 242, in check_ERA5_file s3.download_file('eratest', target_file, r'{}/{}'.format(wd, target_file))

File "C:\tools\Anaconda3\envs\ldar_sim_env\lib\site-packages\boto3\s3\inject.py", line 172, in download_file extra_args=ExtraArgs, callback=Callback)

File "C:\tools\Anaconda3\envs\ldar_sim_env\lib\site-packages\boto3\s3\transfer.py", line 307, in download_file future.result()

File "C:\tools\Anaconda3\envs\ldar_sim_env\lib\site-packages\s3transfer\futures.py", line 106, in result return self._coordinator.result()

File "C:\tools\Anaconda3\envs\ldar_sim_env\lib\site-packages\s3transfer\futures.py", line 265, in result raise self._exception

File "C:\tools\Anaconda3\envs\ldar_sim_env\lib\site-packages\s3transfer\tasks.py", line 255, in _main self._submit(transfer_future=transfer_future, **kwargs)

File "C:\tools\Anaconda3\envs\ldar_sim_env\lib\site-packages\s3transfer\download.py", line 343, in _submit **transfer_future.meta.call_args.extra_args

File "C:\tools\Anaconda3\envs\ldar_sim_env\lib\site-packages\botocore\client.py", line 357, in _api_call return self._make_api_call(operation_name, kwargs)

File "C:\tools\Anaconda3\envs\ldar_sim_env\lib\site-packages\botocore\client.py", line 663, in _make_api_call operation_model, request_dict, request_context)

File "C:\tools\Anaconda3\envs\ldar_sim_env\lib\site-packages\botocore\client.py", line 682, in _make_request return self._endpoint.make_request(operation_model, request_dict)

File "C:\tools\Anaconda3\envs\ldar_sim_env\lib\site-packages\botocore\endpoint.py", line 102, in make_request return self._send_request(request_dict, operation_model)

File "C:\tools\Anaconda3\envs\ldar_sim_env\lib\site-packages\botocore\endpoint.py", line 132, in _send_request request = self.create_request(request_dict, operation_model)

File "C:\tools\Anaconda3\envs\ldar_sim_env\lib\site-packages\botocore\endpoint.py", line 116, in create_request operation_name=operation_model.name)

File "C:\tools\Anaconda3\envs\ldar_sim_env\lib\site-packages\botocore\hooks.py", line 356, in emit return self._emitter.emit(aliased_event_name, **kwargs)

File "C:\tools\Anaconda3\envs\ldar_sim_env\lib\site-packages\botocore\hooks.py", line 228, in emit return self._emit(event_name, kwargs)

File "C:\tools\Anaconda3\envs\ldar_sim_env\lib\site-packages\botocore\hooks.py", line 211, in _emit response = handler(**kwargs)

File "C:\tools\Anaconda3\envs\ldar_sim_env\lib\site-packages\botocore\signers.py", line 90, in handler return self.sign(operation_name, request)

File "C:\tools\Anaconda3\envs\ldar_sim_env\lib\site-packages\botocore\signers.py", line 162, in sign auth.add_auth(request)

File "C:\tools\Anaconda3\envs\ldar_sim_env\lib\site-packages\botocore\auth.py", line 357, in add_auth raise NoCredentialsError

NoCredentialsError: Unable to locate credentials

Line 357 in the auth.py file is: image

Do you know what is missing? Thanks for your help.

tarcadius commented 3 years ago

Hello - sorry about this and thanks for bringing it up - we are currently in the process of moving to AWS to host weather data. This will make input data management much easier in the long term - but will cause some short-term pain. We are currently unable to share login details for the private AWS account (Amazon won't let us!) This will be resolved as soon as we can. In the meantime, you'll have to download ERA5 data manually using the ERA5_downloader python file - or shoot me an email and I can send you some weather data for Alberta to get you going. Once the weather data is in your inputs folder, you should no longer get this error.

We're also working to update LDAR-Sim to not require weather data - stay tuned, won't be long.