Closed Nunak closed 1 year ago
No idea why this would fail with 1.2.5 but not 1.2.4. There are no changes to the setup.py or requirements. 😕
What happens when you just try to pip3 install skodaconnect==1.3.6
, and pip3 install pyjwt
?
Only thing I can see is pyjwt missing. Not sure why it's not detecting the dependency. Try what dvx76 suggested and install pyjwt manually.
Need to look further into this but it's actually easily reproducible in a clean venv. Same error with skodaconnect=1.3.6
, no issue with 1.3.5
😮
$ python3 -m venv test
$ source test/bin/activate
$ pip3 install skodaconnect==1.3.6
Collecting skodaconnect==1.3.6
Using cached skodaconnect-1.3.6.tar.gz (63 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [12 lines of output]
/tmp/pip-install-23gx2hat/skodaconnect_2672f7cde95a4268be8c331a5d174b99/skodaconnect/connection.py:397: SyntaxWarning: "is" with a literal. Did you mean "=="?
if user_form.get('type', None) is 'html':
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/tmp/pip-install-23gx2hat/skodaconnect_2672f7cde95a4268be8c331a5d174b99/setup.py", line 5, in <module>
from skodaconnect.__version__ import __version__ as lib_version
File "/tmp/pip-install-23gx2hat/skodaconnect_2672f7cde95a4268be8c331a5d174b99/skodaconnect/__init__.py", line 7, in <module>
from skodaconnect.connection import Connection
File "/tmp/pip-install-23gx2hat/skodaconnect_2672f7cde95a4268be8c331a5d174b99/skodaconnect/connection.py", line 11, in <module>
import jwt
ModuleNotFoundError: No module named 'jwt'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
$ pip3 install skodaconnect==1.3.5
Collecting skodaconnect==1.3.5
Using cached skodaconnect-1.3.5-py3-none-any.whl (58 kB)
Collecting cryptography
Using cached cryptography-41.0.2-cp37-abi3-manylinux_2_28_x86_64.whl (4.3 MB)
Collecting pyjwt
Using cached PyJWT-2.8.0-py3-none-any.whl (22 kB)
Collecting aiohttp
Using cached aiohttp-3.8.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.0 MB)
Collecting beautifulsoup4
Using cached beautifulsoup4-4.12.2-py3-none-any.whl (142 kB)
Collecting lxml
Using cached lxml-4.9.3-cp310-cp310-manylinux_2_28_x86_64.whl (7.9 MB)
Collecting frozenlist>=1.1.1
Using cached frozenlist-1.4.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (225 kB)
Collecting async-timeout<5.0,>=4.0.0a3
Using cached async_timeout-4.0.2-py3-none-any.whl (5.8 kB)
Collecting charset-normalizer<4.0,>=2.0
Using cached charset_normalizer-3.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (201 kB)
Collecting multidict<7.0,>=4.5
Using cached multidict-6.0.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (114 kB)
Collecting yarl<2.0,>=1.0
Using cached yarl-1.9.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (268 kB)
Collecting aiosignal>=1.1.2
Using cached aiosignal-1.3.1-py3-none-any.whl (7.6 kB)
Collecting attrs>=17.3.0
Using cached attrs-23.1.0-py3-none-any.whl (61 kB)
Collecting soupsieve>1.2
Using cached soupsieve-2.4.1-py3-none-any.whl (36 kB)
Collecting cffi>=1.12
Using cached cffi-1.15.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (441 kB)
Collecting pycparser
Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB)
Collecting idna>=2.0
Using cached idna-3.4-py3-none-any.whl (61 kB)
Installing collected packages: soupsieve, pyjwt, pycparser, multidict, lxml, idna, frozenlist, charset-normalizer, attrs, async-timeout, yarl, cffi, beautifulsoup4, aiosignal, cryptography, aiohttp, skodaconnect
Successfully installed aiohttp-3.8.5 aiosignal-1.3.1 async-timeout-4.0.2 attrs-23.1.0 beautifulsoup4-4.12.2 cffi-1.15.1 charset-normalizer-3.2.0 cryptography-41.0.2 frozenlist-1.4.0 idna-3.4 lxml-4.9.3 multidict-6.0.4 pycparser-2.21 pyjwt-2.8.0 skodaconnect-1.3.5 soupsieve-2.4.1 yarl-1.9.2
@Farfar @WebSpider I've been comparing 1.3.5 with 1.3.6 and I think I found the difference.
So when you pip install 1.3.6, it has to run the setup.py
locally. And that imports from skodaconnect, which then caused the ModuleError trying to import jwt people are seeing. If your Python install so happens to already have pyjwt, it still works, otherwise, it doesn't.
Short term, can we also push the wheel file to PyPI? Long term I think we just need to remove this import from the package init?
@Farfar @WebSpider I've been comparing 1.3.5 with 1.3.6 and I think I found the difference.
- 1.3.5: https://pypi.org/project/skodaconnect/1.3.5/#files has both the source distribution and built distribution (wheel file)
- 1.3.6: https://pypi.org/project/skodaconnect/1.3.6/#files has only the source distribution
So when you pip install 1.3.6, it has to run the
setup.py
locally. And that imports from skodaconnect, which then caused the ModuleError trying to import jwt people are seeing. If your Python install so happens to already have pyjwt, it still works, otherwise, it doesn't.Short term, can we also push the wheel file to PyPI? Long term I think we just need to remove this import from the package init?
I think adding the requirements statically in setup.py should also work:
install_requires=[
pyjwt
]
Of course all other requirements should be included as well.
@Farfar @WebSpider I've been comparing 1.3.5 with 1.3.6 and I think I found the difference.
Short term, can we also push the wheel file to PyPI?
Being new to pypi and distributing python packages, I'll see how i can get this done before my summer holiday starts 👍
Is there any progress? Or is here any steps how to remove this issue? Thanks!
Is there any progress? Or is here any steps how to remove this issue? Thanks!
If you manually install pyjwt it should work.
pip3 install pyjwt
I've already did it (before I asked) and I had already installed pyjwt vers. 2.8.0 :(. It doesn't help in my case ...
Sorry, i didnt make it before summer holidays :grin: Will look at this tonight.
Same here. Impossible to install the current version 1.25 from HACS.
Final error log:
homeassistant.requirements.RequirementsNotFound: Requirements for skodaconnect not found: ['skodaconnect>=1.3.6']
Manual installation pip3 install skodaconnect=1.3.6 failed
Describe the bug A clear and concise description of what the bug is
Setup failed for custom integration skodaconnect: Requirements for skodaconnect not found: ['skodaconnect>=1.3.6'].
Unable to install package skodaconnect>=1.3.6: error: subprocess-exited-with-error × Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> [27 lines of output] /tmp/pip-install-557b3ywc/skodaconnect_d4ec3d67489a4b75a7c2ec93f5398262/skodaconnect/connection.py:397: SyntaxWarning: "is" with a literal. Did you mean "=="? if user_form.get('type', None) is 'html': Traceback (most recent call last): File "/srv/homeassistant/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in main() File "/srv/homeassistant/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main json_out['return_val'] = hook(**hook_input['kwargs']) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/srv/homeassistant/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel return hook(config_settings) ^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-build-env-a1b7tehi/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 341, in get_requires_for_build_wheel return self._get_build_requires(config_settings, requirements=['wheel']) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-build-env-a1b7tehi/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 323, in _get_build_requires self.run_setup() File "/tmp/pip-build-env-a1b7tehi/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 488, in run_setup self).run_setup(setup_script=setup_script) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-build-env-a1b7tehi/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 338, in run_setup exec(code, locals()) File "", line 5, in File "/tmp/pip-install-557b3ywc/skodaconnect_d4ec3d67489a4b75a7c2ec93f5398262/skodaconnect/init.py", line 7, in from skodaconnect.connection import Connection File "/tmp/pip-install-557b3ywc/skodaconnect_d4ec3d67489a4b75a7c2ec93f5398262/skodaconnect/connection.py", line 11, in import jwt ModuleNotFoundError: No module named 'jwt' [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error × Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> See above for output. note: This error originates from a subprocess, and is likely not a problem with pip.
**Is this working in MySkoda app?*** Logout and login in the MySkoda app, preferably on Android. Make sure that you have the latest app updates, sometimes there's new consent needed that will only show in latest app version.
Latest working release If the problem started after updating to a new release, please state latest working release. Previous one was working 1.2.4
Debug logs If applicable, add debug logs. See README on how to enable debug logs with response debugging.
Installation:
acme 1.12.0 apparmor 2.13.6 beautifulsoup4 4.9.3 certbot 1.12.0 certbot-apache 1.10.1 certifi 2020.6.20 cffi 1.15.1 chardet 4.0.0 ConfigArgParse 1.2.3 configobj 5.0.6 cryptography 38.0.1 dbus-python 1.2.16 distro 1.5.0 gpg 1.14.0-unknown html5lib 1.1 idna 2.10 josepy 1.2.0 LibAppArmor 2.13.6 lxml 4.6.3 parsedatetime 2.6 pip 20.3.4 pycparser 2.21 pycurl 7.43.0.6 PyGObject 3.38.0 PyICU 2.5 pymongo 3.11.0 pyOpenSSL 22.1.0 pyRFC3339 1.1 python-apt 2.2.1 python-augeas 0.5.0 pytz 2021.1 requests 2.25.1 requests-toolbelt 0.9.1 setuptools 52.0.0 six 1.16.0 soupsieve 2.2.1 ufw 0.36 urllib3 1.26.5 webencodings 0.5.1 wheel 0.34.2 zope.component 4.3.0 zope.event 4.4 zope.hookable 5.0.1 zope.interface 5.2.0
Additional context Add any other context about the problem here.