Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation issues when using pdm #518

Closed
pohlt opened this issue Feb 19, 2021 · 4 comments · Fixed by #525
Closed

Installation issues when using pdm #518

pohlt opened this issue Feb 19, 2021 · 4 comments · Fixed by #525
Assignees
Labels

Comments

@pohlt
Copy link

pohlt commented Feb 19, 2021

pdm is a new tool for Python environment managing.
It works very well, but when I try to install playwright, it fails to install. You can find the details here:
pdm-project/pdm#269

The PDM developer points out that playwright seems to be missing some required fields in the wheels configs (see last comment in the linked issue).

I would highly appreciate if you could look into this issue. Cheers! 🍺

@pavelfeldman
Copy link
Member

Looks like our .dist-info/RECORD file is missing the driver:

playwright/__init__.py,sha256=oteI15irhZhV2CkypeJoJGKegD2Dl1xocnVXXpKGhrY,941
playwright/__main__.py,sha256=psQZykQObgHVd03xZN2PImGLcz4AukVLsgEbpu9XkKk,1071
playwright/_repo_version.py,sha256=m6xu2HKOwGl2GZAz5JsI8Lst-pg5heLbn7x4Z7zP8gI,33
playwright/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
playwright/_impl/_accessibility.py,sha256=KX1lHBPAm4FGRn_JGmUzAcA8nwUQy8dK4MDtMOAiz4g,2386
playwright/_impl/_api_structures.py,sha256=CpUguQcmYhbh1suoWAqqc17MYfmDw7MdPcNydlj8iQo,2866
playwright/_impl/_api_types.py,sha256=98VKKOsBuMhB4AxVNVVfAAvKVTuh9tTNtqxfnxV6Xlc,897
playwright/_impl/_async_base.py,sha256=9GTjy6PjvCL13yrtK1FmmT23f9YwX_XTRKjJ7adaMkQ,2521
playwright/_impl/_browser.py,sha256=z98HYF5C-avFRwOmlficYnJW2TSY4pCgNST9kc1z6Ko,6396
playwright/_impl/_browser_context.py,sha256=VSTE6Gf5iQ4rjNbiOQTClhcY0pwmdcYGxqEPgCL5JQE,9491
playwright/_impl/_browser_type.py,sha256=2coI1-dF9McQ1fGl8mesDJKRnHsukRyptsgn0C2_mJQ,5078
playwright/_impl/_cdp_session.py,sha256=PZrkNybdcrXtosTQdOBYrqv45ws6LFpwHOi9GU2e8H8,1425
playwright/_impl/_chromium_browser_context.py,sha256=L49C5_4-ohjVG_s53HXEpX-dIIa4tUb3ofGmkBuCyKM,2385
playwright/_impl/_connection.py,sha256=VRVq__qKbd0LJrOYpgYMHVkPybzFdNCDaXsB4bJZbRc,11186
playwright/_impl/_console_message.py,sha256=-H3yV8ouy_owyM4bTEZeJrUU8a11Lljv-5asg8iq7SY,1438
playwright/_impl/_dialog.py,sha256=7FnHPK2w17-Rb94hrp8s6BPMz9o8RiJRa-k-1gTUYCo,1398
playwright/_impl/_download.py,sha256=8jiQkHILAHXXdKDnj_lv_zUoUFftmKiQCcUC1xFDFkQ,1639
playwright/_impl/_driver.py,sha256=1PWvR4MnHtGKT29wRZrtEqfZ9G7oKDi6UP4VGLAFXtM,1409
playwright/_impl/_element_handle.py,sha256=AhrAFWd2_d0245o1e_4Y5NAtHeVkGaEOWIpu2sNsmv0,11057
playwright/_impl/_event_context_manager.py,sha256=VeoPq1oXrLs_b3l2EM8gp378vHti6MGbrFOhOPOccSc,1044
playwright/_impl/_file_chooser.py,sha256=X71w5Vmb8yLWpo-xhtIS5rLT1Q2IryXSuJttchJI70k,2752
playwright/_impl/_frame.py,sha256=7ziLW1BjhzkJpsRumGgtjj4D5GctvLskPvLXEIvGYzE,17560
playwright/_impl/_helper.py,sha256=Eg0c1DqGjxPlc3GhXoJsZPgRnmQKhVuh9YD4OI8tQUI,6027
playwright/_impl/_impl_to_api_mapping.py,sha256=n5tYb7WNlO5P8axaRlnH9IcLEFx12ntYOQYjpPRhJ3A,3263
playwright/_impl/_input.py,sha256=X6pFWu-_uHXzJAJ6s6E8JrfnLtjWMwVsi0B9MYeQfHs,3165
playwright/_impl/_js_handle.py,sha256=ajFYL7T4e7GpsWobtztU1lUZXuhjy6QYXxvrBEOYsgs,5464
playwright/_impl/_network.py,sha256=0hKR92HOWsT82Qzb1d7ukJ8ii4knpGe-3aZRVHY6Y-s,11948
playwright/_impl/_object_factory.py,sha256=UvizFPOYuMmPasoebnwxL-XplZZOIZL6q5Kmkzn6SRQ,3829
playwright/_impl/_page.py,sha256=DHGYkeiRTn-bwusutEr5QNjrJw3cHX10pNV1bpECnz8,32851
playwright/_impl/_path_utils.py,sha256=VKPxeaFXpaOva6RDq0MJ1inkXKi4N7Zn26IPRsO7JoA,854
playwright/_impl/_playwright.py,sha256=adITkR5Ubf1SBOeVHJoWwHpdyUjOHQrLPgD9KG5KAh8,1865
playwright/_impl/_selectors.py,sha256=vkeCiqYItTi8BDpYC8dH4-0wEsFBMvkm2Em7m3e7jiY,1492
playwright/_impl/_sync_base.py,sha256=d7ZxVhkdkLnGUbuH9LJeB0yVNgfkgfKc8zWNsCdkrrM,4741
playwright/_impl/_transport.py,sha256=hAIOgHYSxoaahNzH8Y64x0LSx0P63j6p4dKAKIFmLmI,3595
playwright/_impl/_video.py,sha256=mfomZ7Hp0llpDhuzoUjJKY9Dq8SAsKwG_zNpSS887R0,1412
playwright/_impl/_wait_helper.py,sha256=AcHOoNamIETs1DYI5NYfVxHPMokwuf-vwwWMDSmGG1Y,3274
playwright/async_api/__init__.py,sha256=CVKjIdIz9f6hl89W62z_58EiuPCnW2lW3dyX7FE5Jb4,3103
playwright/async_api/_context_manager.py,sha256=tAxuU-Lon-fbi7YZH6busHgAQOr-lEiAdOjxYt3e27s,1665
playwright/async_api/_generated.py,sha256=z5mLxnQ77oOT7lyLVZ0VQuylDkIYpYWrF13UiddeBVA,354117
playwright/sync_api/__init__.py,sha256=WRzV7SIk-drtddT9FdNImuBMLi6l7hw37K487qqPWsM,3099
playwright/sync_api/_context_manager.py,sha256=9-IYgmTURCTl9NnNgKaV8_IVvac3oVNcZGEPyGLZalo,2607
playwright/sync_api/_generated.py,sha256=9gLHNluzOJ4Cfb5xY7fVaZO3CH9m60dIfu_WH9dupyU,356741
playwright-0.0.post280+gc05cad2.dist-info/LICENSE,sha256=f6sUYbQZcP83bxyTA6Y3B2v6rrcc0S3TocRKr1mhork,11399
playwright-0.0.post280+gc05cad2.dist-info/METADATA,sha256=O9p17mPcE7dWMNpEy2nA1foEqNSuzOspcoaW3TiYvBQ,10788
playwright-0.0.post280+gc05cad2.dist-info/WHEEL,sha256=EVRjI69F5qVjm_YgqcTXPnTAv3BfSUr0WVAHuSP3Xoo,92
playwright-0.0.post280+gc05cad2.dist-info/entry_points.txt,sha256=BjfGcw0OvLar2lGqBqJ2puhY98bHRGeXMNHC091BsWE,57
playwright-0.0.post280+gc05cad2.dist-info/top_level.txt,sha256=oYiz5-Zb4y23ANZot2i3lMsK-BAiwXqTlQ4hytLJYuE,11
playwright-0.0.post280+gc05cad2.dist-info/RECORD,,

https://www.python.org/dev/peps/pep-0427/ suggests that

During extraction, wheel installers verify all the hashes in RECORD against the file contents.
Apart from RECORD and its signatures, installation will fail if any file in the archive is not both
mentioned and correctly hashed in RECORD.

@kumaraditya303
Copy link
Contributor

kumaraditya303 commented Feb 25, 2021

@pavelfeldman @pohlt #525 Fixes it

@pohlt
Copy link
Author

pohlt commented Mar 1, 2021

Hm, maybe I hit a different issue, but pdm still has problems to install version 1.9.1

Maybe this snippet helps:

ERRORS:
add playwright failed:
Traceback (most recent call last):
  File "/usr/lib64/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/tom/.local/lib/python3.8/site-packages/pdm/installers/synchronizers.py", line 146, in install_candidate
    installer.install(can)
  File "/home/tom/.local/lib/python3.8/site-packages/pdm/installers/installers.py", line 48, in install
    self.install_wheel(candidate.wheel)
  File "/home/tom/.local/lib/python3.8/site-packages/pdm/installers/installers.py", line 54, in install_wheel
    wheel.install(paths, maker)
  File "/home/tom/.local/lib/python3.8/site-packages/distlib/wheel.py", line 549, in install
    row = records[u_arcname]
KeyError: 'playwright/driver/playwright.sh'

I just realized that #525 didn't make it into 1.9.1, right?

@kumaraditya303
Copy link
Contributor

kumaraditya303 commented Mar 1, 2021

Yes, the pull request isn't merged yet. @pohlt

holg added a commit to holg/playwright-python that referenced this issue Mar 9, 2021
* commit '0a1c8b7df31d1faa6941eb9e05f772619eddd41b':
  chore: Bump twisted to PyPI release (microsoft#543)
  fix: microsoft#518 Update RECORD file during wheel creation (microsoft#525)
  chore: source -> script in add_init_script messages (microsoft#540)
  fix: don't set attr on bound method (microsoft#539)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants