question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Multiscrape not working after most recent update

See original GitHub issue

I just upgraded to the latest HACs version of multiscrape and my sensors now no longer work.

Version of the custom_component

v6.2.1

Configuration

multiscrape:
  - resource: https://covidlive.com.au/report/daily-cases/nsw
    scan_interval: 3600
    headers: 
      User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_2) AppleWebKit/601.3.9 (KHTML, like Gecko) Version/9.0.2 Safari/601.3.9
    sensor:
      - unique_id: nsw_covid_total 
        name: NSW COVID Cases - Total
        select: ".DAILY-CASES tr:nth-child(2) .COL3.CASES"
        icon: mdi:virus
        #value_template: "{{ value and value or '' }}"

      - unique_id: nsw_covid_today
        name: NSW COVID Cases - Today
        select: ".DAILY-CASES tr:nth-child(2) .COL5.NET"
        icon: mdi:virus
        #value_template: "{{ value and value or '' }}"

      - unique_id: nsw_covid_last_update
        name: NSW COVID Cases - Last Update
        select: ".DAILY-CASES tr:nth-child(2) .COL1.DATE"
        icon: mdi:virus
        #value_template: "{{ value and value or '' }}"

Describe the bug

I’ve been running multiscrape for some time and the above sensors have been working fine. After upgrading to v6.2.1, multiscrape is no longer functioning and errors as per the error below.

Debug log


This error originated from a custom integration.

Logger: homeassistant.loader
Source: custom_components/multiscrape/sensor.py:40 
Integration: Multiscrape scraping component (documentation, issues) 
First occurred: 8:15:46 PM (3 occurrences) 
Last logged: 8:15:46 PM

Unexpected exception importing platform custom_components.multiscrape.sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/loader.py", line 603, in get_platform
    cache[full_name] = self._import_platform(platform_name)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 620, in _import_platform
    return importlib.import_module(f"{self.pkg_path}.{platform_name}")
  File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/config/custom_components/multiscrape/sensor.py", line 40, in <module>
    discovery_info: DiscoveryInfoType | None = None,
TypeError: unsupported operand type(s) for |: 'types.GenericAlias' and 'NoneType'

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:4
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
danieldotnlcommented, Apr 28, 2022

Fixed in v6.2.2

@Sjorsa This is not related. Index feature has been removed since 6.0.0. (this might help you: https://github.com/danieldotnl/ha-multiscrape/issues/111)

1reaction
duffydcommented, Apr 28, 2022

I can confirm my multiscrape sensors are online again. Many thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Multiscrape broken in newest update? · Issue #31
Multiscrape is just not starting up anymore for me since the latest update. Before the update everything worked
Read more >
Issue with Multiscrape / Scrape - Configuration
The rest sensor alone is not working, but works together with the multiscrape. I entered the following to my configuration.yaml:
Read more >
Scrape Sensor in Home Assistant - Extract Info From Websites
I'll walk you through extracting information from websites, such as key dates, or facts, and importing them into Home Assistant using a ......
Read more >
Parameterized Complexity Dichotomy for Steiner Multicut
This problem generalizes several graph cut problems, in particular the Multicut problem (the case p = 2), which is fixed-parameter tractable for the...
Read more >
ON THE HARDNESS OF APPROXIMATING MULTICUT ...
Abstract. We show that the Multicut, Sparsest-Cut, and Min-. 2CNF ≡ Deletion problems are NP-hard to approximate within every constant factor, assuming the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found