Closed CheemaOTB closed 3 years ago
My dirty solution: add
ca.crt
andca.key
from https://github.com/wkeeling/selenium-wire/tree/master/seleniumwire in soft AppData folder
Did you put it in this directory "C:\Users\Owner\AppData\Roaming"?
@CheemaOTB
Hello, I am also hearing from some users that they are experiencing the same issue. Where should ca.crt
and ca.key
be placed?
Make the Pyinstaller include seleniumwire
's ca.crt
and ca.key
manually.
Using pyi-makespec
, we can create and edit a .spec
file to inject here a list of dependent static resources. (See, Using Spec Files)
For example, this code is injecting the dependant resources to the datas
argument when creating an Analysis
object.
from os.path import join, dirname, abspath, split
from os import sep
import glob
import seleniumwire
pkg_dir = split(seleniumwire.__file__)[0]
pkg_data = []
pkg_data.extend((file, dirname(file).split("site-packages")[1]) for file in glob.iglob(join(pkg_dir,"**{}*".format(sep)), recursive=True))
a = Analysis([f'..{os.sep}qtmain.py'],
pathex=['F:\\repositories\\corona-virus-vaccine-reservation'],
binaries=[],
datas=pkg_data,
hiddenimports=[],
(Here the actual code.)
Then, finally, we can build an executable file from the .spec
file with a command like pyinstaller foobar.spec
.
I compiled a python script that was using selenium wire so that my friend could use it but he gets this error.