Skip to content

R1 Pro - AttributeError: 'NoneType' object has no attribute 'lower' #17

@vaylvn

Description

@vaylvn

Hey there,

I know this project is more for the WalkingPad A1 however as you mention it seems the R1 Pro works under a similar setup.

Unfortunately I'm hitting this barrier upon trying to run

ph4-walkingpad-ctl --stats 750 --json-file ~/walking.json

C:\Users\xxxxxxxx>ph4-walkingpad-ctl --stats 750 --json-file ~/walking.json
C:\Users\xxxxxxxx\AppData\Local\Programs\Python\Python311\Lib\site-packages\ph4_walkingpad\pad.py:74: FutureWarning: BLEDevice.metadata is deprecated and will be removed in a future version of Bleak, use AdvertisementData instead
  info_str = ', '.join(["[%2d]" % i, str(dev[i].address), str(dev[i].name), str(dev[i].metadata["uuids"])])
C:\Users\xxxxxxxx\AppData\Local\Programs\Python\Python311\Lib\site-packages\ph4_walkingpad\pad.py:80: FutureWarning: BLEDevice.metadata is deprecated and will be removed in a future version of Bleak, use AdvertisementData instead
  self.devices_dict[dev[i].address].append(dev[i].metadata["uuids"])
2024-08-29 16:05:48 DESKTOP-130LB3O ph4_walkingpad.main[8752] ERROR Exception in the main entry point: 'NoneType' object has no attribute 'lower'
Traceback (most recent call last):
  File "C:\Users\xxxxxxxx\AppData\Local\Programs\Python\Python311\Lib\site-packages\ph4_walkingpad\main.py", line 375, in main
    await self.work()
  File "C:\Users\xxxxxxxx\AppData\Local\Programs\Python\Python311\Lib\site-packages\ph4_walkingpad\main.py", line 91, in work
    address = await self.scan_address()
              ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\xxxxxxxx\AppData\Local\Programs\Python\Python311\Lib\site-packages\ph4_walkingpad\main.py", line 135, in scan_address
    await scanner.scan(timeout=self.args.scan_timeout)
  File "C:\Users\xxxxxxxx\AppData\Local\Programs\Python\Python311\Lib\site-packages\ph4_walkingpad\pad.py", line 83, in scan
    if dev_name and dev_name in dev[i].name.lower():
                                ^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'lower'

I'd assume this means it's unable to find the device however I'm not too sure what my options are. I've ensured it's not already connected to the phone so that shouldn't be the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions