Errno 22 invalid mode('U') or filename

871 views Asked by At

I'm facing error

[Errno 22] invalid mode('U') or filename:' ' while creating exe file using cx_

Freeze in Python. my code includes some vbs file which are actually require to interact with Windows features. Those .vbs files are located in same location.

I'm new to this Python. Maybe some silly mistake

Please any help will be really appreciable.

Below is the part of the code. All imports are taken care already.

if s1 == "xx" or s1 == "yy":
    os.system("response.vbs")
else:
    os.system("no.vbs")

Sorry cannot post the overall code.

1

There are 1 answers

0
Shivam Sharma On

Well Problem get solved. This was first time I was using cx_freez. If we don't mention the fields under setup this error occurs.

setup( name = "THIS CANNOT BE BLANK", version = "0.1", description = "trigger", executables = [Executable("THIS CANNOT BE BLANK")], )

Thank you Tinfoilboy for your responses.

Silly me :(