custom-components / custom_updater

[DEPRECATED]📦 A component which allows you to track and update custom cards/components and python_scripts
MIT License
166 stars 66 forks source link

Empty list in Tracker card #70

Closed advokatb closed 5 years ago

advokatb commented 5 years ago

Version of the custom_component 3.1.8

Describe the bug I've added some lines to my configuration.yaml

custom_updater:
  track:
    - cards
    - components

I've added custom cards in my Lovelace config

resources:
  - url: /local/js/mini-media-player-bundle.js?v=5
    type: module
  - url: /local/js/alarm_control_panel-card.js?v=0.4.0
    type: js
  - url: /local/js/slider-entity-row.js?v=d6da75
    type: js
  - url: /local/js/ext-weblink.js?v=0.3.2
    type: js
  - url: /local/js/card-modder.js?v=fadc03
    type: module
  - url: /local/js/useful-markdown-card.js?v=dfc268
    type: js
  - url: /local/js/fold-entity-row.js?v=5ab35c
    type: js  
  - url: /local/js/tracker-card.js?v=0.1.5
    type: js
  - url: /local/js/column-card.js?v=c8c80f
    type: js          
  - url: /local/js/card-tools.js?v=6ce5d0
    type: js     
  - url: /local/js/state-attribute-element.js?v=5
    type: js
  - url: /local/js/text-element.js?v=5
    type: js
  - url: /local/js/monster-card.js?v=5
    type: js
  - url: /local/js/compact-custom-header.js?v=5
    type: js        
  - url: /local/js/secondaryinfo-entity-row.js
    type: module  

But Tracker card do not show any list. default

log

2019-01-19 19:31:05 ERROR (MainThread) [homeassistant.setup] Error during setup of component custom_updater
Traceback (most recent call last):
  File "d:\program\python\python36\lib\site-packages\homeassistant\setup.py", line 148, in _async_setup_component
    component.setup, hass, processed_config)  # type: ignore
  File "d:\program\python\python36\lib\asyncio\futures.py", line 331, in __iter__
    yield self  # This tells Task to wait for completion.
  File "d:\program\python\python36\lib\asyncio\tasks.py", line 244, in _wakeup
    future.result()
  File "d:\program\python\python36\lib\asyncio\futures.py", line 244, in result
    raise self._exception
  File "d:\program\python\python36\lib\concurrent\futures\thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "d:\User\.homeassistant\custom_components\custom_updater.py", line 65, in setup
    config_show_installabe)
  File "d:\User\.homeassistant\custom_components\custom_updater.py", line 134, in __init__
    self.cache_versions()
  File "d:\User\.homeassistant\custom_components\custom_updater.py", line 140, in cache_versions
    self.custom_url)
  File "d:\User\.homeassistant\deps\Python36\site-packages\pyupdate\ha_custom\custom_cards.py", line 59, in get_sensor_data
    local_version = get_local_version(base_dir, name)
  File "d:\User\.homeassistant\deps\Python36\site-packages\pyupdate\ha_custom\custom_cards.py", line 166, in get_local_version
    for line in local.readlines():
  File "d:\program\python\python36\lib\encodings\cp1251.py", line 23, in decode
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x98 in position 3524: character maps to <undefined>
ludeeus commented 5 years ago

It fail during setup, that's why it does not show anything, please enable debugging as described in the wiki, and post the output here

advokatb commented 5 years ago
2019-01-19 19:52:14 INFO (SyncWorker_1) [custom_components.custom_updater] if you have ANY issues with this, please report them here: https://github.com/custom-components/custom_updater
2019-01-19 19:52:14 DEBUG (SyncWorker_1) [pyupdate.ha_custom.common] get_repo_data: "['https://raw.githubusercontent.com/custom-cards/information/master/repos.json']"
2019-01-19 19:52:15 DEBUG (SyncWorker_1) [pyupdate.ha_custom.custom_cards] get_info_all_cards: {'aftership-card': ['aftership-card', '0.0.1', 'https://raw.githubusercontent.com/custom-cards/aftership-card/master/aftership-card.js', 'https://github.com/custom-cards/aftership-card', 'https://github.com/custom-cards/aftership-card'], 'alarm_control_panel-card': ['alarm_control_panel-card', '0.4.0', 'https://raw.githubusercontent.com/ciotlosm/custom-lovelace/master/alarm_control_panel-card/alarm_control_panel-card.js', 'https://github.com/ciotlosm/custom-lovelace/tree/master/alarm_control_panel-card', 'https://github.com/ciotlosm/custom-lovelace/tree/master/alarm_control_panel-card/changelog.md'], 'beer-card': ['beer-card', '0.2.3', 'https://raw.githubusercontent.com/ciotlosm/custom-lovelace/master/beer-card/beer-card.js', 'https://github.com/ciotlosm/custom-lovelace/tree/master/beer-card', 'https://github.com/ciotlosm/custom-lovelace/tree/master/beer-card/changelog.md'], 'beer-wishlist-card': ['beer-wishlist-card', None, 'https://raw.githubusercontent.com/custom-cards/beer-wishlist-card/master/beer-wishlist-card.js', 'https://github.com/custom-cards/beer-wishlist-card', 'https://github.com/custom-cards/beer-wishlist-card'], 'bignumber-card': ['bignumber-card', '0.0.1', 'https://raw.githubusercontent.com/ciotlosm/custom-lovelace/master/bignumber-card/bignumber-card.js', 'https://github.com/ciotlosm/custom-lovelace/tree/master/bignumber-card', 'https://github.com/ciotlosm/custom-lovelace/tree/master/bignumber-card/changelog.md'], 'browser-commander': ['browser-commander', 'b48257', 'https://raw.githubusercontent.com/thomasloven/lovelace-browser-commander/master/browser-commander.js', 'https://github.com/thomasloven/lovelace-browser-commander', 'https://github.com/thomasloven/lovelace-browser-commander'], 'button-entity-row': ['button-entity-row', 'v0.1.3', 'https://raw.githubusercontent.com/custom-cards/button-entity-row/master/button-entity-row.js', 'https://github.com/custom-cards/button-entity-row', 'https://github.com/custom-cards/button-entity-row'], 'canvas-gauge-card': ['canvas-gauge-card', '0.0.2', 'https://raw.githubusercontent.com/custom-cards/canvas-gauge-card/master/canvas-gauge-card.js', 'https://github.com/custom-cards/canvas-gauge-card', 'https://github.com/custom-cards/canvas-gauge-card'], 'card-modder': ['card-modder', 'fadc03', 'https://raw.githubusercontent.com/thomasloven/lovelace-card-modder/master/card-modder.js', 'https://github.com/thomasloven/lovelace-card-modder', 'https://github.com/thomasloven/lovelace-card-modder'], 'card-tools': ['card-tools', '6ce5d0', 'https://raw.githubusercontent.com/thomasloven/lovelace-card-tools/master/card-tools.js', 'https://github.com/thomasloven/lovelace-card-tools', 'https://github.com/thomasloven/lovelace-card-tools'], 'circle-sensor-card': ['circle-sensor-card', '1.2.0', 'https://raw.githubusercontent.com/custom-cards/circle-sensor-card/master/circle-sensor-card.js', 'https://github.com/custom-cards/circle-sensor-card', 'https://github.com/custom-cards/circle-sensor-card'], 'color-glance-card': ['color-glance-card', '4717b8', 'https://raw.githubusercontent.com/thomasloven/lovelace-color-glance-card/master/color-glance-card.js', 'https://github.com/thomasloven/lovelace-color-glance-card', 'https://github.com/thomasloven/lovelace-color-glance-card'], 'column-card': ['column-card', 'c8c80f', 'https://raw.githubusercontent.com/thomasloven/lovelace-column-card/master/column-card.js', 'https://github.com/thomasloven/lovelace-column-card', 'https://github.com/thomasloven/lovelace-column-card'], 'compact-custom-header': ['compact-custom-header', '0.2.7', 'https://raw.githubusercontent.com/maykar/compact-custom-header/master/compact-custom-header.js', 'https://github.com/maykar/compact-custom-header', 'https://github.com/maykar/compact-custom-header/releases/tag/0.2.7'], 'entity-attributes-card': ['entity-attributes-card', '0.1.1', 'https://raw.githubusercontent.com/ciotlosm/custom-lovelace/master/entity-attributes-card/entity-attributes-card.js', 'https://github.com/ciotlosm/custom-lovelace/tree/master/entity-attributes-card', 'https://github.com/ciotlosm/custom-lovelace/tree/master/entity-attributes-card/changelog.md'], 'ext-weblink': ['ext-weblink', '0.3.2', 'https://raw.githubusercontent.com/custom-cards/ext-weblink/master/ext-weblink.js', 'https://github.com/custom-cards/ext-weblink', 'https://github.com/custom-cards/ext-weblink'], 'flex-table-card': ['flex-table-card', '0.4.0', 'https://raw.githubusercontent.com/custom-cards/flex-table-card/master/flex-table-card.js', 'https://github.com/custom-cards/flex-table-card', 'https://github.com/custom-cards/flex-table-card'], 'fold-entity-row': ['fold-entity-row', '5ab35c', 'https://raw.githubusercontent.com/thomasloven/lovelace-fold-entity-row/master/fold-entity-row.js', 'https://github.com/thomasloven/lovelace-fold-entity-row', 'https://github.com/thomasloven/lovelace-fold-entity-row'], 'fullykiosk': ['fullykiosk', '96feda', 'https://raw.githubusercontent.com/thomasloven/lovelace-fullykiosk/master/fullykiosk.js', 'https://github.com/thomasloven/lovelace-fullykiosk', 'https://github.com/thomasloven/lovelace-fullykiosk'], 'gauge-card': ['gauge-card', '0.2.0', 'https://raw.githubusercontent.com/ciotlosm/custom-lovelace/master/gauge-card/gauge-card.js', 'https://github.com/ciotlosm/custom-lovelace/tree/master/gauge-card', 'https://github.com/ciotlosm/custom-lovelace/tree/master/gauge-card/changelog.md'], 'group-card': ['group-card', '0.0.2', 'https://raw.githubusercontent.com/ciotlosm/custom-lovelace/master/group-card/group-card.js', 'https://github.com/ciotlosm/custom-lovelace/tree/master/group-card', 'https://github.com/ciotlosm/custom-lovelace/tree/master/group-card/changelog.md'], 'home-setter': ['home-setter', '0.0.1', 'https://raw.githubusercontent.com/ciotlosm/custom-lovelace/master/home-setter/home-setter.js', 'https://github.com/ciotlosm/custom-lovelace/tree/master/home-setter', 'https://github.com/ciotlosm/custom-lovelace/tree/master/home-setter/changelog.md'], 'homeassistant-gen': ['homeassistant-gen', '29a60d', 'https://raw.githubusercontent.com/thomasloven/homeassistant-lovelace-gen/master/homeassistant-gen.js', 'https://github.com/thomasloven/homeassistant-lovelace-gen', 'https://github.com/thomasloven/homeassistant-lovelace-gen'], 'krisinfo-card': ['krisinfo-card', '0.0.4', 'https://raw.githubusercontent.com/isabellaalstrom/krisinfo-card/master/krisinfo-card.js', 'https://github.com/isabellaalstrom/krisinfo-card', 'https://github.com/isabellaalstrom/krisinfo-card'], 'layout-card': ['layout-card', 'bd7e5a', 'https://raw.githubusercontent.com/thomasloven/lovelace-layout-card/master/layout-card.js', 'https://github.com/thomasloven/lovelace-layout-card', 'https://github.com/thomasloven/lovelace-layout-card'], 'light-entity-row': ['light-entity-row', 'v0.2.2', 'https://raw.githubusercontent.com/custom-cards/light-entity-row/master/light-entity-row.js', 'https://github.com/custom-cards/light-entity-row', 'https://github.com/custom-cards/light-entity-row'], 'list-card': ['list-card', 'v0.0.7', 'https://raw.githubusercontent.com/custom-cards/list-card/master/list-card.js', 'https://github.com/custom-cards/list-card', 'https://github.com/custom-cards/list-card'], 'long-press': ['long-press', 'ca07e2', 'https://raw.githubusercontent.com/thomasloven/lovelace-long-press/master/long-press.js', 'https://github.com/thomasloven/lovelace-long-press', 'https://github.com/thomasloven/lovelace-long-press'], 'monster-card': ['monster-card', '0.2.3', 'https://raw.githubusercontent.com/ciotlosm/custom-lovelace/master/monster-card/monster-card.js', 'https://github.com/ciotlosm/custom-lovelace/tree/master/monster-card', 'https://github.com/ciotlosm/custom-lovelace/tree/master/monster-card/changelog.md'], 'pc-card': ['pc-card', 'v0.0.2', 'https://raw.githubusercontent.com/custom-cards/pc-card/master/pc-card.js', 'https://github.com/custom-cards/pc-card', 'https://github.com/custom-cards/pc-card'], 'plan-coordinates': ['plan-coordinates', '0.1.0', 'https://raw.githubusercontent.com/ciotlosm/custom-lovelace/master/plan-coordinates/plan-coordinates.js', 'https://github.com/ciotlosm/custom-lovelace/tree/master/plan-coordinates', 'https://github.com/ciotlosm/custom-lovelace/tree/master/plan-coordinates/changelog.md'], 'player': ['player', '43020c', 'https://raw.githubusercontent.com/thomasloven/lovelace-player/master/player.js', 'https://github.com/thomasloven/lovelace-player', 'https://github.com/thomasloven/lovelace-player'], 'popup-card': ['popup-card', '02923e', 'https://raw.githubusercontent.com/thomasloven/lovelace-popup-card/master/popup-card.js', 'https://github.com/thomasloven/lovelace-popup-card', 'https://github.com/thomasloven/lovelace-popup-card'], 'rmv-card': ['rmv-card', None, 'https://raw.githubusercontent.com/custom-cards/rmv-card/master/rmv-card.js', 'https://github.com/custom-cards/rmv-card', 'https://github.com/custom-cards/rmv-card'], 'roku-card': ['roku-card', 'v0.0.1', 'https://raw.githubusercontent.com/custom-cards/roku-card/master/roku-card.js', 'https://github.com/custom-cards/roku-card', 'https://github.com/custom-cards/roku-card'], 'slider-entity-row': ['slider-entity-row', 'd6da75', 'https://raw.githubusercontent.com/thomasloven/lovelace-slider-entity-row/master/slider-entity-row.js', 'https://github.com/thomasloven/lovelace-slider-entity-row', 'https://github.com/thomasloven/lovelace-slider-entity-row'], 'state-attribute-element': ['state-attribute-element', '0.2.0', 'https://raw.githubusercontent.com/custom-cards/state-attribute-element/master/state-attribute-element.js', 'https://github.com/custom-cards/state-attribute-element', 'https://github.com/custom-cards/state-attribute-element'], 'state-element': ['state-element', '0.0.1', 'https://raw.githubusercontent.com/custom-cards/state-element/master/state-element.js', 'https://github.com/custom-cards/state-element', 'https://github.com/custom-cards/state-element'], 'state-switch': ['state-switch', '2b02f2', 'https://raw.githubusercontent.com/thomasloven/lovelace-state-switch/master/state-switch.js', 'https://github.com/thomasloven/lovelace-state-switch', 'https://github.com/thomasloven/lovelace-state-switch'], 'surveillance-card': ['surveillance-card', '0.0.1', 'https://raw.githubusercontent.com/custom-cards/surveillance-card/master/surveillance-card.js', 'https://github.com/custom-cards/surveillance-card', 'https://github.com/custom-cards/surveillance-card'], 'text-element': ['text-element', '0.0.2', 'https://raw.githubusercontent.com/custom-cards/text-element/master/text-element.js', 'https://github.com/custom-cards/text-element', 'https://github.com/custom-cards/text-element'], 'thermostat-card': ['thermostat-card', '0.1.1', 'https://raw.githubusercontent.com/ciotlosm/custom-lovelace/master/thermostat-card/thermostat-card.js', 'https://github.com/ciotlosm/custom-lovelace/tree/master/thermostat-card', 'https://github.com/ciotlosm/custom-lovelace/tree/master/thermostat-card/changelog.md'], 'time-input-row': ['time-input-row', 'f503b7', 'https://raw.githubusercontent.com/thomasloven/lovelace-time-input-row/master/time-input-row.js', 'https://github.com/thomasloven/lovelace-time-input-row', 'https://github.com/thomasloven/lovelace-time-input-row'], 'toggle-lock-entity-row': ['toggle-lock-entity-row', 'a57ac1', 'https://raw.githubusercontent.com/thomasloven/lovelace-toggle-lock-entity-row/master/toggle-lock-entity-row.js', 'https://github.com/thomasloven/lovelace-toggle-lock-entity-row', 'https://github.com/thomasloven/lovelace-toggle-lock-entity-row'], 'tracker-card': ['tracker-card', '0.1.5', 'https://raw.githubusercontent.com/custom-cards/tracker-card/master/tracker-card.js', 'https://github.com/custom-cards/tracker-card', 'https://github.com/custom-cards/tracker-card'], 'upcoming-media-card': ['upcoming-media-card', '0.3.4', 'https://raw.githubusercontent.com/custom-cards/upcoming-media-card/master/upcoming-media-card.js', 'https://github.com/custom-cards/upcoming-media-card', 'https://github.com/custom-cards/upcoming-media-card'], 'useful-markdown-card': ['useful-markdown-card', 'dfc268', 'https://raw.githubusercontent.com/thomasloven/lovelace-useful-markdown-card/master/useful-markdown-card.js', 'https://github.com/thomasloven/lovelace-useful-markdown-card', 'https://github.com/thomasloven/lovelace-useful-markdown-card'], 'username-element': ['username-element', '0.0.1', 'https://raw.githubusercontent.com/custom-cards/username-element/master/username-element.js', 'https://github.com/custom-cards/username-element', 'https://github.com/custom-cards/username-element'], 'vertical-stack-in-card': ['vertical-stack-in-card', 'v0.1.0', 'https://raw.githubusercontent.com/custom-cards/vertical-stack-in-card/master/vertical-stack-in-card.js', 'https://github.com/custom-cards/vertical-stack-in-card', 'https://github.com/custom-cards/vertical-stack-in-card']}
2019-01-19 19:52:15 ERROR (MainThread) [homeassistant.setup] Error during setup of component custom_updater
Traceback (most recent call last):
  File "d:\program\python\python36\lib\site-packages\homeassistant\setup.py", line 148, in _async_setup_component
    component.setup, hass, processed_config)  # type: ignore
  File "d:\program\python\python36\lib\asyncio\futures.py", line 331, in __iter__
    yield self  # This tells Task to wait for completion.
  File "d:\program\python\python36\lib\asyncio\tasks.py", line 244, in _wakeup
    future.result()
  File "d:\program\python\python36\lib\asyncio\futures.py", line 244, in result
    raise self._exception
  File "d:\program\python\python36\lib\concurrent\futures\thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "d:\User\.homeassistant\custom_components\custom_updater.py", line 65, in setup
    config_show_installabe)
  File "d:\User\.homeassistant\custom_components\custom_updater.py", line 134, in __init__
    self.cache_versions()
  File "d:\User\.homeassistant\custom_components\custom_updater.py", line 140, in cache_versions
    self.custom_url)
  File "d:\User\.homeassistant\deps\Python36\site-packages\pyupdate\ha_custom\custom_cards.py", line 59, in get_sensor_data
    local_version = get_local_version(base_dir, name)
  File "d:\User\.homeassistant\deps\Python36\site-packages\pyupdate\ha_custom\custom_cards.py", line 166, in get_local_version
    for line in local.readlines():
  File "d:\program\python\python36\lib\encodings\cp1251.py", line 23, in decode
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x98 in position 3810: character maps to <undefined>
ludeeus commented 5 years ago

Do you have a ui-lovelace.yaml file in your configuration dir?

advokatb commented 5 years ago

Of couse I do d:\User\.homeassistant\ui-lovelace.yaml

ludeeus commented 5 years ago

It has issues reading that file, it could be that you are running Windows. I'm not aware of anyone that has tried that. Would you mind sharing that file so I can test it?

advokatb commented 5 years ago

This is my config ui-lovelace.zip This config I've got from forum. There is no problem in ui-lovelace_black.yaml. So I think that the problem is in list of custom components. ui-lovelace_black.zip

ghost commented 5 years ago

But when i have config file lovelace in path /.storage it not working ? Not use mode yaml for lovelace....

callifo commented 5 years ago

Same issue as above, when you move over to the lovelace storage mode, it no longer shows any cards being tracked for updates.

When using storage mode, I still need to have the legacy ui-lovelace.yaml file there for it get the resources list.

ludeeus commented 5 years ago

@pepeEL && @callifo unless your issue is the same as the OP, you should create a new issue. But storage mode is not supported ;) https://github.com/custom-components/custom_updater/wiki/Installation#note-about-tracking-cards-on-ha-version--0840

callifo commented 5 years ago

@pepeEL && @callifo unless your issue is the same as the OP, you should create a new issue. But storage mode is not supported ;) https://github.com/custom-components/custom_updater/wiki/Installation#note-about-tracking-cards-on-ha-version--0840

No worries thanks, hadn't seen that.

ludeeus commented 5 years ago

@advokatb I have tested your config, and it works for me (tested with docker + debain). This may be a windows issue, but I cannot test/verify that.

advokatb commented 5 years ago

@advokatb I have tested your config, and it works for me (tested with docker + debain). This may be a windows issue, but I cannot test/verify that.

I've cleaned up all my cards and left only js includes and custom:tracker-card. ui-lovelace.zip In this case everything works fine default But with my full config I've got the problem described above. ui-lovelace_full.zip How can I identify a problem?

ludeeus commented 5 years ago

Can you try with pyupdate==0.2.19 in the custom_updater.py file? you may need to wait a couple of mins, I just pushed this version

advokatb commented 5 years ago

Can you try with pyupdate==0.2.19 in the custom_updater.py file? you may need to wait a couple of mins, I just pushed this version

I've manually changed REQUIREMENTS = ['pyupdate==0.2.19'] in custom_updater.py file and now I can see card's updates! Thanks! What was the problem?

But now when I'm trying to update all I've got

2019-02-03 12:58:52 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1859215169016] Error handling message: {'type': 'call_service', 'domain': 'custom_updater', 'service': 'update_all', 'service_data': {}, 'id': 18}
Traceback (most recent call last):
  File "d:\program\python\python36\lib\site-packages\homeassistant\components\websocket_api\decorators.py", line 17, in _handle_async_response
    await func(hass, connection, msg)
  File "d:\program\python\python36\lib\site-packages\homeassistant\components\websocket_api\commands.py", line 148, in handle_call_service
    connection.context(msg))
  File "d:\program\python\python36\lib\site-packages\homeassistant\core.py", line 1129, in async_call
    self._execute_service(handler, service_call))
  File "d:\program\python\python36\lib\asyncio\futures.py", line 331, in __iter__
    yield self  # This tells Task to wait for completion.
  File "d:\program\python\python36\lib\asyncio\tasks.py", line 244, in _wakeup
    future.result()
  File "d:\program\python\python36\lib\asyncio\futures.py", line 244, in result
    raise self._exception
  File "d:\program\python\python36\lib\asyncio\tasks.py", line 181, in _step
    result = coro.throw(exc)
  File "d:\program\python\python36\lib\site-packages\homeassistant\core.py", line 1153, in _execute_service
    await self._hass.async_add_executor_job(handler.func, service_call)
  File "d:\program\python\python36\lib\asyncio\futures.py", line 331, in __iter__
    yield self  # This tells Task to wait for completion.
  File "d:\program\python\python36\lib\asyncio\tasks.py", line 244, in _wakeup
    future.result()
  File "d:\program\python\python36\lib\asyncio\futures.py", line 244, in result
    raise self._exception
  File "d:\program\python\python36\lib\concurrent\futures\thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "d:\User\.homeassistant\custom_components\custom_updater.py", line 94, in update_all_service
    card_controller.update_all()
  File "d:\User\.homeassistant\custom_components\custom_updater.py", line 149, in update_all
    self.custom_url)
  File "d:\User\.homeassistant\deps\Python36\site-packages\pyupdate\ha_custom\custom_cards.py", line 87, in update_all
    upgrade_single(base_dir, name, custom_repos)
  File "d:\User\.homeassistant\deps\Python36\site-packages\pyupdate\ha_custom\custom_cards.py", line 97, in upgrade_single
    local_file = get_card_dir(base_dir, name) + name + '.js'
  File "d:\User\.homeassistant\deps\Python36\site-packages\pyupdate\ha_custom\custom_cards.py", line 132, in get_card_dir
    for line in local.readlines():
  File "d:\program\python\python36\lib\encodings\cp1251.py", line 23, in decode
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x98 in position 7085: character maps to <undefined>
ludeeus commented 5 years ago

The issue is

UnicodeDecodeError: 'charmap' codec can't decode byte 0x98 in position 7085: character maps to <undefined>

Not sure why you get that, but I added a bypass in 0.2.19, from your error it looks like I need to add that bypass in more places

ludeeus commented 5 years ago

Pushed 3.1.11 for this component now, this should handle all your decode issues.

advokatb commented 5 years ago

Pushed 3.1.11 for this component now, this should handle all your decode issues.

2019-02-03 13:08:21 ERROR (SyncWorker_0) [homeassistant.util.package] Unable to install package pyupdate==0.2.20: Could not find a version that satisfies the requirement pyupdate==0.2.20 (from versions: 0.1.0, 0.1.1, 0.1.2, 0.1.3, 0.1.4, 0.1.5, 0.1.6, 0.2.0, 0.2.1, 0.2.2, 0.2.3, 0.2.4, 0.2.5, 0.2.6, 0.2.7, 0.2.8, 0.2.9, 0.2.10, 0.2.11, 0.2.12, 0.2.13, 0.2.14, 0.2.15, 0.2.16, 0.2.17, 0.2.18, 0.2.19)

No matching distribution found for pyupdate==0.2.20 2019-02-03 13:08:21 ERROR (MainThread) [homeassistant.requirements] Not initializing custom_updater because could not install requirement pyupdate==0.2.20 2019-02-03 13:08:21 ERROR (MainThread) [homeassistant.setup] Setup failed for custom_updater: Could not install all requirements.


Maybe I need to wait some time? :)
ludeeus commented 5 years ago

Possibly :) https://pypi.org/project/pyupdate/0.2.20/ it is live, but it usually take a couple of mins before mirrors are updated :)

advokatb commented 5 years ago

Possibly :) https://pypi.org/project/pyupdate/0.2.20/ it is live, but it usually take a couple of mins before mirrors are updated :)

My ui-lovelace.yaml totally cleaned up after I click Update All. Errors in log appears right after I click this button.

So now Custom Updates see all my cards and their version numbers but I can't update them.

2019-02-03 13:38:24 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1948899355168] Error handling message: {'type': 'call_service', 'domain': 'custom_updater', 'service': 'update_all', 'service_data': {}, 'id': 19}
Traceback (most recent call last):
  File "d:\program\python\python36\lib\site-packages\homeassistant\components\websocket_api\decorators.py", line 17, in _handle_async_response
    await func(hass, connection, msg)
  File "d:\program\python\python36\lib\site-packages\homeassistant\components\websocket_api\commands.py", line 148, in handle_call_service
    connection.context(msg))
  File "d:\program\python\python36\lib\site-packages\homeassistant\core.py", line 1129, in async_call
    self._execute_service(handler, service_call))
  File "d:\program\python\python36\lib\asyncio\futures.py", line 331, in __iter__
    yield self  # This tells Task to wait for completion.
  File "d:\program\python\python36\lib\asyncio\tasks.py", line 244, in _wakeup
    future.result()
  File "d:\program\python\python36\lib\asyncio\futures.py", line 244, in result
    raise self._exception
  File "d:\program\python\python36\lib\asyncio\tasks.py", line 181, in _step
    result = coro.throw(exc)
  File "d:\program\python\python36\lib\site-packages\homeassistant\core.py", line 1153, in _execute_service
    await self._hass.async_add_executor_job(handler.func, service_call)
  File "d:\program\python\python36\lib\asyncio\futures.py", line 331, in __iter__
    yield self  # This tells Task to wait for completion.
  File "d:\program\python\python36\lib\asyncio\tasks.py", line 244, in _wakeup
    future.result()
  File "d:\program\python\python36\lib\asyncio\futures.py", line 244, in result
    raise self._exception
  File "d:\program\python\python36\lib\concurrent\futures\thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "d:\User\.homeassistant\custom_components\custom_updater.py", line 94, in update_all_service
    card_controller.update_all()
  File "d:\User\.homeassistant\custom_components\custom_updater.py", line 149, in update_all
    self.custom_url)
  File "d:\User\.homeassistant\deps\Python36\site-packages\pyupdate\ha_custom\custom_cards.py", line 87, in update_all
    upgrade_single(base_dir, name, custom_repos)
  File "d:\User\.homeassistant\deps\Python36\site-packages\pyupdate\ha_custom\custom_cards.py", line 100, in upgrade_single
    update_resource_version(base_dir, name, custom_repos)
  File "d:\User\.homeassistant\deps\Python36\site-packages\pyupdate\ha_custom\custom_cards.py", line 125, in update_resource_version
    name + '.js?v=' + str(remote_version))
  File "d:\User\.homeassistant\deps\Python36\site-packages\pyupdate\ha_custom\common.py", line 81, in replace_all
    for line in fileinput.input(file, inplace=True):
  File "d:\program\python\python36\lib\fileinput.py", line 250, in __next__
    line = self._readline()
  File "d:\program\python\python36\lib\fileinput.py", line 364, in _readline
    return self._readline()
  File "d:\program\python\python36\lib\encodings\cp1251.py", line 23, in decode
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x98 in position 7085: character maps to <undefined>
ludeeus commented 5 years ago

If that is the case, I will probably not be able to resolve this, and until you move to a unix distro you should not use this :(

advokatb commented 5 years ago

If that is the case, I will probably not be able to resolve this, and until you move to a unix distro you should not use this :(

Thanks for help! Please don't forget about this issue. Maybe someday you will find a solution for this case :)

Now I am able to see if there is an update for a card. And that's good! I'm planning to cut my config piece by piece to find out the problem. I will ask for help if I find something interesting.

ludeeus commented 5 years ago

https://github.com/custom-components/custom_updater/releases/tag/4.0.0 handles this differently, you can try that one.

advokatb commented 5 years ago

https://github.com/custom-components/custom_updater/releases/tag/4.0.0 handles this differently, you can try that one.

Seems that everything is fine and work as expected! Thanks! I can see new updates and update cards by clicking on button.

ludeeus commented 5 years ago

Nice!