project-alice-assistant / ProjectAliceSkills

A repository containing all curated skills made by the community
GNU General Public License v3.0
25 stars 15 forks source link

[BUG] FreeCurrencyConverter: setting API key via web interface not possible #118

Closed Fe3lApAcUt closed 4 years ago

Fe3lApAcUt commented 4 years ago

Describe the bug setting API key via web interface not possible

To Reproduce Steps to reproduce the behavior:

  1. Open web interface
  2. Skills
  3. try to set API key for Free Currency Converter
  4. Click Save

Expected behavior API key should be save in config.json

Logs

Traceback (most recent call last):
  File "/home/pi/ProjectAlice/venv/lib/python3.7/site-packages/flask/app.py", line 2463, in __call__
    return self.wsgi_app(environ, start_response)
  File "/home/pi/ProjectAlice/venv/lib/python3.7/site-packages/flask/app.py", line 2449, in wsgi_app
    response = self.handle_exception(e)
  File "/home/pi/ProjectAlice/venv/lib/python3.7/site-packages/flask/app.py", line 1866, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/home/pi/ProjectAlice/venv/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/home/pi/ProjectAlice/venv/lib/python3.7/site-packages/flask/app.py", line 2446, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/pi/ProjectAlice/venv/lib/python3.7/site-packages/flask/app.py", line 1951, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/pi/ProjectAlice/venv/lib/python3.7/site-packages/flask/app.py", line 1820, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/pi/ProjectAlice/venv/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/home/pi/ProjectAlice/venv/lib/python3.7/site-packages/flask/app.py", line 1949, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/pi/ProjectAlice/venv/lib/python3.7/site-packages/flask/app.py", line 1935, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/pi/ProjectAlice/venv/lib/python3.7/site-packages/flask_classful.py", line 268, in proxy
    response = view(**request.view_args)
  File "/home/pi/ProjectAlice/venv/lib/python3.7/site-packages/flask_classful.py", line 239, in inner
    return fn(*args, **kwargs)
  File "/home/pi/ProjectAlice/core/interface/views/SkillsView.py", line 60, in saveSkillSettings
    value=confValue
  File "/home/pi/ProjectAlice/core/base/ConfigManager.py", line 134, in updateSkillConfigurationFile
    vartype = self._skillsTemplateConfigurations[skillName][key]['dataType']
TypeError: string indices must be integers

Alice version 1.0.0-b1

Fe3lApAcUt commented 4 years ago

Of course you can enter the API key directly in config.json

philipp2310 commented 4 years ago

thanks for reporting and sorry for the slow response, somehow went under my radar!

I just pushed a change for this issue.