Windows problems
@xuhui_liu I have tested your app on Windows. The settings page loads nicely, but the file system browser menu does not work, which means I am unable to view and select any folders. The problem is most likely related to the differences between Unix and Windows path conventions. Here's the error message:
(adi_env) C:\Users\oliskir\Documents\testing_adi\adi\acoustic_detector_interface-feature-Add_table>flask run
* Serving Flask app "flaskr" (lazy loading)
* Environment: development
* Debug mode: on
* Restarting with windowsapi reloader
* Debugger is active!
* Debugger PIN: 218-895-560
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
127.0.0.1 - - [04/Sep/2019 19:38:35] "[37mGET /settings HTTP/1.1[0m" 200 -
127.0.0.1 - - [04/Sep/2019 19:38:35] "[1m[35mGET /settings/jstree/none HTTP/1.1[0m" 500 -
Traceback (most recent call last):
File "C:\Users\oliskir\Anaconda3\envs\adi_env\lib\os.py", line 675, in __getitem__
value = self._data[self.encodekey(key)]
KeyError: 'HOME'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\oliskir\Anaconda3\envs\adi_env\lib\site-packages\flask\app.py", line 2463, in __call__
return self.wsgi_app(environ, start_response)
File "C:\Users\oliskir\Anaconda3\envs\adi_env\lib\site-packages\flask\app.py", line 2449, in wsgi_app
response = self.handle_exception(e)
File "C:\Users\oliskir\Anaconda3\envs\adi_env\lib\site-packages\flask\app.py", line 1866, in handle_exception
reraise(exc_type, exc_value, tb)
File "C:\Users\oliskir\Anaconda3\envs\adi_env\lib\site-packages\flask\_compat.py", line 39, in reraise
raise value
File "C:\Users\oliskir\Anaconda3\envs\adi_env\lib\site-packages\flask\app.py", line 2446, in wsgi_app
response = self.full_dispatch_request()
File "C:\Users\oliskir\Anaconda3\envs\adi_env\lib\site-packages\flask\app.py", line 1951, in full_dispatch_request
rv = self.handle_user_exception(e)
File "C:\Users\oliskir\Anaconda3\envs\adi_env\lib\site-packages\flask\app.py", line 1820, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "C:\Users\oliskir\Anaconda3\envs\adi_env\lib\site-packages\flask\_compat.py", line 39, in reraise
raise value
File "C:\Users\oliskir\Anaconda3\envs\adi_env\lib\site-packages\flask\app.py", line 1949, in full_dispatch_request
rv = self.dispatch_request()
File "C:\Users\oliskir\Anaconda3\envs\adi_env\lib\site-packages\flask\app.py", line 1935, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "C:\Users\oliskir\Documents\testing_adi\adi\acoustic_detector_interface-feature-Add_table\flaskr\settings.py", line 72, in jstree
dirname = os.environ['HOME']
File "C:\Users\oliskir\Anaconda3\envs\adi_env\lib\os.py", line 678, in __getitem__
raise KeyError(key) from None
KeyError: 'HOME'
127.0.0.1 - - [04/Sep/2019 19:38:35] "[1m[35mGET /settings/jstree/none HTTP/1.1[0m" 500 -
Traceback (most recent call last):
File "C:\Users\oliskir\Anaconda3\envs\adi_env\lib\os.py", line 675, in __getitem__
value = self._data[self.encodekey(key)]
KeyError: 'HOME'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\oliskir\Anaconda3\envs\adi_env\lib\site-packages\flask\app.py", line 2463, in __call__
return self.wsgi_app(environ, start_response)
File "C:\Users\oliskir\Anaconda3\envs\adi_env\lib\site-packages\flask\app.py", line 2449, in wsgi_app
response = self.handle_exception(e)
File "C:\Users\oliskir\Anaconda3\envs\adi_env\lib\site-packages\flask\app.py", line 1866, in handle_exception
reraise(exc_type, exc_value, tb)
File "C:\Users\oliskir\Anaconda3\envs\adi_env\lib\site-packages\flask\_compat.py", line 39, in reraise
raise value
File "C:\Users\oliskir\Anaconda3\envs\adi_env\lib\site-packages\flask\app.py", line 2446, in wsgi_app
response = self.full_dispatch_request()
File "C:\Users\oliskir\Anaconda3\envs\adi_env\lib\site-packages\flask\app.py", line 1951, in full_dispatch_request
rv = self.handle_user_exception(e)
File "C:\Users\oliskir\Anaconda3\envs\adi_env\lib\site-packages\flask\app.py", line 1820, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "C:\Users\oliskir\Anaconda3\envs\adi_env\lib\site-packages\flask\_compat.py", line 39, in reraise
raise value
File "C:\Users\oliskir\Anaconda3\envs\adi_env\lib\site-packages\flask\app.py", line 1949, in full_dispatch_request
rv = self.dispatch_request()
File "C:\Users\oliskir\Anaconda3\envs\adi_env\lib\site-packages\flask\app.py", line 1935, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "C:\Users\oliskir\Documents\testing_adi\adi\acoustic_detector_interface-feature-Add_table\flaskr\settings.py", line 72, in jstree
dirname = os.environ['HOME']
File "C:\Users\oliskir\Anaconda3\envs\adi_env\lib\os.py", line 678, in __getitem__
raise KeyError(key) from None
KeyError: 'HOME'
It is important that we get the app working on Windows too.