core: Nextcloud: UnboundLocalError: local variable 'ncm' referenced before assignment
The problem
I tried to setup nextcloud configuration based on manual.
What version of Home Assistant Core has the issue?
core-2022.10.4
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Supervised
Integration causing the issue
nextcloud
Link to integration documentation on our website
https://www.home-assistant.io/integrations/nextcloud/
Diagnostics information
Logger: homeassistant.setup
Source: components/nextcloud/__init__.py:105
First occurred: 15:48:28 (1 occurrences)
Last logged: 15:48:28
Error during setup of component nextcloud
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 235, in _async_setup_component
result = await task
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/nextcloud/__init__.py", line 105, in setup
hass.data[DOMAIN] = get_data_points(ncm.data)
UnboundLocalError: local variable 'ncm' referenced before assignment
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 19 (18 by maintainers)
Commits related to this issue
- #80673 Fix 'ncm' referenced before assignmen UnboundLocalError: local variable 'ncm' referenced before assignmen Signed-off-by: Dusan Cervenka <cervenka.dusan@gmail.com> — committed to Hadatko/core by Hadatko 2 years ago
- #80673 Correct fix of ssl for nextcloud — committed to Hadatko/core by Hadatko 2 years ago
- #80673 changes based on review Signed-off-by: Dusan Cervenka <cervenka.dusan@gmail.com> — committed to Hadatko/core by Hadatko 2 years ago
- Fix nextcloud 'ncm' referenced before assignment (#80711) * #80673 Fix 'ncm' referenced before assignmen UnboundLocalError: local variable 'ncm' referenced before assignmen Signed-off-by: Dusa... — committed to home-assistant/core by Hadatko 2 years ago
- Revert "#80673 Correct fix of ssl for nextcloud" This reverts commit 6a274e43bb48c81a453a7be7fdd9a93bc76596c4. — committed to Hadatko/core by Hadatko 2 years ago
- Fix nextcloud 'ncm' referenced before assignment (#80711) * #80673 Fix 'ncm' referenced before assignmen UnboundLocalError: local variable 'ncm' referenced before assignmen Signed-off-by: Dusa... — committed to Djelibeybi/home-assistant-core by Hadatko 2 years ago
Hi @meichthys , as i don’t have working nextcloud server i cannot test this code. Could you test it and fix bugs if you find any? It is more or less your own code anyway 😉 I will try write some tests today and if it will work for you i can create PR.
Thank you very much for provided info and sorry for bothering.