Python >=3.5.3 on Synology

synology
Tags: #<Tag:0x00007f47fc0c0620>

#41

I’m not sure about DS214+, I’m on DS212j. But I happen to still keeping some of the package wheel files, so you can see if they work for you. the files are here https://ufile.io/y43ic (the file will be deleted after 30days by the site)


#42

Thank you @thy1225

I successfully complied homeassistant and with the packages with spksrc. I have only one problem right now.

2018-11-20 08:51:30 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/homeassistant/env/lib/python3.5/site-packages/aiohttp/web_protocol.py", line 390, in start
    resp = await self._request_handler(request)
  File "/usr/local/homeassistant/env/lib/python3.5/site-packages/aiohttp/web_app.py", line 366, in _handle
    resp = await handler(request)
  File "/usr/local/homeassistant/env/lib/python3.5/site-packages/aiohttp/web_middlewares.py", line 106, in impl
    return await handler(request)
  File "/usr/local/homeassistant/share/homeassistant/homeassistant/components/http/static.py", line 66, in staticresource_middleware
    return await handler(request)
  File "/usr/local/homeassistant/share/homeassistant/homeassistant/components/http/real_ip.py", line 34, in real_ip_middleware
    return await handler(request)
  File "/usr/local/homeassistant/share/homeassistant/homeassistant/components/http/ban.py", line 66, in ban_middleware
    return await handler(request)
  File "/usr/local/homeassistant/share/homeassistant/homeassistant/components/http/auth.py", line 97, in auth_middleware
    return await handler(request)
  File "/usr/local/homeassistant/share/homeassistant/homeassistant/components/http/real_ip.py", line 34, in real_ip_middleware
    return await handler(request)
  File "/usr/local/homeassistant/share/homeassistant/homeassistant/components/http/ban.py", line 66, in ban_middleware
    return await handler(request)
  File "/usr/local/homeassistant/share/homeassistant/homeassistant/components/http/auth.py", line 97, in auth_middleware
    return await handler(request)
  File "/usr/local/homeassistant/share/homeassistant/homeassistant/components/http/view.py", line 113, in handle
    result = await result
  File "/usr/local/homeassistant/share/homeassistant/homeassistant/components/cloud/http_api.py", line 81, in error_handler
    result = await handler(view, request, *args, **kwargs)
  File "/usr/local/homeassistant/share/homeassistant/homeassistant/components/http/data_validator.py", line 47, in wrapper
    result = await method(view, request, *args, **kwargs)
  File "/usr/local/homeassistant/share/homeassistant/homeassistant/components/cloud/http_api.py", line 138, in post
    data['password'])
  File "/usr/local/python3/lib/python3.5/asyncio/futures.py", line 381, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/local/python3/lib/python3.5/asyncio/tasks.py", line 310, in _wakeup
    future.result()
  File "/usr/local/python3/lib/python3.5/asyncio/futures.py", line 294, in result
    raise self._exception
  File "/usr/local/python3/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/homeassistant/share/homeassistant/homeassistant/components/cloud/auth_api.py", line 91, in login
    cognito = _authenticate(cloud, email, password)
  File "/usr/local/homeassistant/share/homeassistant/homeassistant/components/cloud/auth_api.py", line 144, in _authenticate
    cognito.authenticate(password=password)
  File "/usr/local/homeassistant/env/lib/python3.5/site-packages/warrant/__init__.py", line 383, in authenticate
    self.verify_token(tokens['AuthenticationResult']['IdToken'],'id_token','id')
  File "/usr/local/homeassistant/env/lib/python3.5/site-packages/warrant/__init__.py", line 206, in verify_token
    issuer=unverified_claims.get('iss'))
  File "/usr/local/homeassistant/env/lib/python3.5/site-packages/jose/jwt.py", line 132, in decode
    payload = jws.verify(token, key, algorithms, verify=verify_signature)
  File "/usr/local/homeassistant/env/lib/python3.5/site-packages/jose/jws.py", line 75, in verify
    _verify_signature(signing_input, header, signature, key, algorithms)
  File "/usr/local/homeassistant/env/lib/python3.5/site-packages/jose/jws.py", line 262, in _verify_signature
    if not _sig_matches_keys(keys, signing_input, signature, alg):
  File "/usr/local/homeassistant/env/lib/python3.5/site-packages/jose/jws.py", line 210, in _sig_matches_keys
    key = jwk.construct(key, alg)
  File "/usr/local/homeassistant/env/lib/python3.5/site-packages/jose/jwk.py", line 61, in construct
    return key_class(key_data, algorithm)
  File "/usr/local/homeassistant/env/lib/python3.5/site-packages/jose/backends/cryptography_backend.py", line 148, in __init__
    self.prepared_key = self._process_jwk(key)
  File "/usr/local/homeassistant/env/lib/python3.5/site-packages/jose/backends/cryptography_backend.py", line 174, in _process_jwk
    verifying_key = rsa.RSAPublicNumbers(e, n).public_key(self.cryptography_backend())
  File "/usr/local/homeassistant/env/lib/python3.5/site-packages/cryptography/hazmat/backends/__init__.py", line 15, in default_backend
    from cryptography.hazmat.backends.openssl.backend import backend
  File "/usr/local/homeassistant/env/lib/python3.5/site-packages/cryptography/hazmat/backends/openssl/__init__.py", line 7, in <module>
    from cryptography.hazmat.backends.openssl.backend import backend
  File "/usr/local/homeassistant/env/lib/python3.5/site-packages/cryptography/hazmat/backends/openssl/backend.py", line 53, in <module>
    from cryptography.hazmat.bindings.openssl import binding
  File "/usr/local/homeassistant/env/lib/python3.5/site-packages/cryptography/hazmat/bindings/openssl/binding.py", line 13, in <module>
    from cryptography.hazmat.bindings._openssl import ffi, lib
ImportError: /usr/local/homeassistant/env/lib/python3.5/site-packages/cryptography/hazmat/bindings/_openssl.abi3.so: undefined symbol: pthread_atfork

Anyone get the same error when I try to login to cloud services?


#43

I had problems with the cloud login too, but it was solved by following @hogi1200 's solution in his post.

I’m not sure if this the problem for you right now but if you compiled some of the whl files on your own, maybe you can see if those packages have the same naming problem.


#44

Finally get it resolved. I complied the wrong python3 site-packages again with spksrc. The required enviroment variable is the following:

export CFLAGS=-pthread

Affected site-packages are: cffi==1.11.2 && cryptography==2.3.1

Now, I have fully working cloud :slight_smile: and Xiaomi Robot Vacuum with the latest Home Assistant 0.82 on DS214+


#45

Congratulations! I’d also upgraded to 0.82 and everything’s working fine. :slight_smile:


#46

From yesterday there is a new update for the python3 package from the synocommunity repo. The new version of supported python is 3.5.6-8 with added modules for sqlite3 and lxml. Later todat I’ll try to install Home-Assistant with it.


#47

Is it possible to install the latest HomeAssistant (0.83.0 and later) with python 3.5.6.8?
Anyone has a detailed step by step instruction how to do this on an older Synology (DS212)?