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.

Hi,

I’m trying to install your api. I had some problems to install bluepy, but now I solved it, I get this error I don’t know how to resolve:

pip3 install ./xiaomi-flower-care-api/
Processing ./xiaomi-flower-care-api
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-89uw8bo2-build/setup.py", line 13, in <module>
        long_description=readme(),
      File "/tmp/pip-89uw8bo2-build/setup.py", line 7, in readme
        return readme_file.read()
      File "/usr/lib/python3.5/encodings/ascii.py", line 26, in decode
        return codecs.ascii_decode(input, self.errors)[0]
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 830: ordinal not in range(128)

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-89uw8bo2-build/

Can you help me? I don’t know a lot of python, so maybe it’s trivial, sorry if I asking something too simple.

Thanks!

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:8

github_iconTop GitHub Comments

3reactions
sanguinocommented, Mar 31, 2019

I fixed it adding encoding=‘utf8’ to setup.py:

def readme():
    with open('README.md', encoding='utf8') as readme_file:
        return readme_file.read()

But now I have a problem executing read.py:

~/xiaomi-flower-care-api/example $ sudo python3 read.py
Getting data from device..

Traceback (most recent call last):
  File "read.py", line 15, in <module>
    print('Name: {}'.format(sensor.name))
  File "../flowercare/reader.py", line 39, in name
    response = self._read_handle(_HANDLE_DEVICE_NAME)
  File "../flowercare/reader.py", line 127, in _read_handle
    with Peripheral(self._mac, iface=self._interface) as connection:
  File "/usr/local/lib/python3.5/dist-packages/bluepy/btle.py", line 391, in __init__
    self._connect(deviceAddr, addrType, iface)
  File "/usr/local/lib/python3.5/dist-packages/bluepy/btle.py", line 434, in _connect
    rsp = self._getResp('stat')
  File "/usr/local/lib/python3.5/dist-packages/bluepy/btle.py", line 407, in _getResp
    resp = self._waitResp(wantType + ['ntfy', 'ind'], timeout)
  File "/usr/local/lib/python3.5/dist-packages/bluepy/btle.py", line 339, in _waitResp
    raise BTLEInternalError("Helper exited")
bluepy.btle.BTLEInternalError: Helper exited
Exception ignored in: <bound method Peripheral.__del__ of <bluepy.btle.Peripheral object at 0xb6aa5870>>
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/bluepy/btle.py", line 630, in __del__
    self.disconnect()
  File "/usr/local/lib/python3.5/dist-packages/bluepy/btle.py", line 453, in disconnect
    self._writeCmd("disc\n")
  File "/usr/local/lib/python3.5/dist-packages/bluepy/btle.py", line 305, in _writeCmd
    self._helper.stdin.flush()
BrokenPipeError: [Errno 32] Broken pipe
1reaction
ghostcommented, Jul 14, 2019

I have also encountered the same error with Python 3.5.3 @vrachieru Could you please write which Python version did you use?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to Install Apps or Software on Windows? Here's ...
Unable to Install Apps or Software on Windows? Here's What to Do · 1. Reboot Your Computer · 2. Check App Installer Settings...
Read more >
Fix problems downloading apps from the Play Store
Try the steps below if: Your downloads and app updates get stuck and won't finish. You can't download or install apps or games...
Read more >
Can't Install Anything on Windows 10: 7 Easy Expert fixes
How do I fix Windows 10 if it can't install anything? · 1. Terminate the Windows Installer process · 2. Disable Fast Startup...
Read more >
I can't install programs in Windows 10
Try installing the app again. If that does not work: Open Start Type: cmd. Right click CMD Click Run as administrator. At the...
Read more >
Top 6 Ways to Fix Unable to Install Programs or Software ...
Top 6 Ways to Fix Unable to Install Programs or Software on Windows 11 · 1. Check Program Compatibility · 2. Run Installer...
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