syncthingmanager icon indicating copy to clipboard operation
syncthingmanager copied to clipboard

device list and folder list crash

Open doronbehar opened this issue 8 years ago • 6 comments

Traceback for stman device list:

Traceback (most recent call last):
  File "/usr/bin/stman", line 11, in <module>
    load_entry_point('syncthingmanager==0.1.0', 'console_scripts', 'stman')()
  File "/usr/lib/python3.6/site-packages/syncthingmanager/__init__.py", line 810, in main
    st._device_list()
  File "/usr/lib/python3.6/site-packages/syncthingmanager/__init__.py", line 469, in _device_list
    config = self.system.config()
  File "/usr/lib/python3.6/site-packages/syncthing/__init__.py", line 279, in config
    return self.get('config')
  File "/usr/lib/python3.6/site-packages/syncthing/__init__.py", line 180, in get
    return_response, raw_exceptions)
  File "/usr/lib/python3.6/site-packages/syncthing/__init__.py", line 250, in _request
    if isinstance(json_data, dict) and j.get('error'):
NameError: name 'j' is not defined

Traceback for stman folder list:

Traceback (most recent call last):
  File "/usr/bin/stman", line 11, in <module>
    load_entry_point('syncthingmanager==0.1.0', 'console_scripts', 'stman')()
  File "/usr/lib/python3.6/site-packages/syncthingmanager/__init__.py", line 861, in main
    st._folder_list()
  File "/usr/lib/python3.6/site-packages/syncthingmanager/__init__.py", line 566, in _folder_list
    config = self.system.config()
  File "/usr/lib/python3.6/site-packages/syncthing/__init__.py", line 279, in config
    return self.get('config')
  File "/usr/lib/python3.6/site-packages/syncthing/__init__.py", line 180, in get
    return_response, raw_exceptions)
  File "/usr/lib/python3.6/site-packages/syncthing/__init__.py", line 250, in _request
    if isinstance(json_data, dict) and j.get('error'):
NameError: name 'j' is not defined

It is the first time I'm using syncthingmanager. I could use it only since python-syncthing was upgraded to 2.2.0 because of https://github.com/blakev/python-syncthing/issues/18.

From my pour knowledge in python, this is a problem with python-syncthing, I just thought it should be reported here because I don't know how to reproduce it without syncthingmanager.

doronbehar avatar Jan 02 '18 23:01 doronbehar

Any updates about this issue?

sacob0ne avatar Jan 22 '18 18:01 sacob0ne

Take a look at my teensy PR. It is a temporary fix, but it is working for me.

grampelberg avatar Jan 24 '18 17:01 grampelberg

what's mean teensy PR? how to setup the update from the git clone?

junlicn avatar Feb 27 '18 04:02 junlicn

https://help.github.com/articles/checking-out-pull-requests-locally/

doronbehar avatar Feb 27 '18 15:02 doronbehar

Just adding in that I too am suffering from this and would love an answer...

gampelberg, I tried your fix but unfortunately not working for me

JasonDD avatar Mar 07 '18 18:03 JasonDD

After the last update to the main syncthing dependency, and after I've patched it so it won't depend on specific versions of requests and dateutils, I don't experience this problem anymore.

doronbehar avatar Aug 25 '18 13:08 doronbehar