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

cx_freeze 6.1 fails in cxfreeze command line #560

Closed
msilano opened this issue Jan 5, 2020 · 18 comments
Closed

cx_freeze 6.1 fails in cxfreeze command line #560

msilano opened this issue Jan 5, 2020 · 18 comments

Comments

@msilano
Copy link

msilano commented Jan 5, 2020

When trying to run cx_freeze 6.1 on Windows 10 against any python file, it fails with the error:
TypeError: init() missing 1 required positional argument: 'constantsModule'. Stack trace below.

Thanks!

C:\Users\mike\Box\Inbox\boxbot>cxfreeze test.py
Traceback (most recent call last):
File "c:\users\mike\appdata\local\programs\python\python38-32\lib\runpy.py", line 193, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\users\mike\appdata\local\programs\python\python38-32\lib\runpy.py", line 86, in run_code
exec(code, run_globals)
File "C:\Users\mike\AppData\Local\Programs\Python\Python38-32\Scripts\cxfreeze.exe_main
.py", line 7, in
File "c:\users\mike\appdata\local\programs\python\python38-32\lib\site-packages\cx_Freeze\main.py", line 165, in main
freezer = cx_Freeze.Freezer(executables,
TypeError: init() missing 1 required positional argument: 'constantsModule'

C:\Users\mike\Box\Inbox\boxbot>type test.py
print("Hello")

@msilano msilano changed the title cx_freeze 6.1 on Windows 10 fails with a TypeError cx_freeze 6.1 on Windows 10 / Python 3.8.1 fails with a TypeError Jan 5, 2020
@marcelotduarte marcelotduarte changed the title cx_freeze 6.1 on Windows 10 / Python 3.8.1 fails with a TypeError cx_freeze 6.1 fails in cxfreeze command line Jan 5, 2020
@marcelotduarte
Copy link
Owner

Thanks for reporting. PR #561 will solve this.
As a workaround, create a minimal setup.py manually or using the command line "cxfreeze-quickstart".

@marcelotduarte marcelotduarte self-assigned this Jan 5, 2020
@msilano
Copy link
Author

msilano commented Jan 5, 2020

Thanks for the quick fix. Really appreciate the help.

@ghost
Copy link

ghost commented Feb 10, 2020

Hello i've the same issue (v 6.1). Is there a fix ?

@ShanshanBi
Copy link

Thanks for reporting. PR #561 will solve this.
As a workaround, create a minimal setup.py manually or using the command line "cxfreeze-quickstart".

I use quickstart,PermissionError: [Errno 13] Permission denied: . And I checked my folder properties, it can be read, write and modify

@marizoldi
Copy link

I have the same issue but in MacOS. Using cxfreeze-quickstart fixed it. Shall I open a new issue?

@marcelotduarte
Copy link
Owner

Shall I open a new issue? No.
Patch is available.
4a24f1c

@jschueller
Copy link

could a new version be published ?

@Berserker66
Copy link

Apparently this is related:
https://bugreports.qt.io/browse/PYSIDE-1257

@marcelotduarte
Copy link
Owner

@Berserker66 No, this issue is a simple command line cxfreeze that has a error. If you use a setup, you do not need this. If you use python setup.py build, you do not need this.
In your bug report at pyside, I see that you use py38 to build but you reference py36 hardcoded in your setup.

@Berserker66
Copy link

The "if holoviews" where the python 36 line occurs hasn't been used in ages, you can see that the holoviews variable is turned to off and the code is simply there should it be needed again. Any actually currently used code should not reference python 36

@marcelotduarte
Copy link
Owner

Oh... ;-)
Related to this case appears to be PR #570

@Berserker66
Copy link

Berserker66 commented Apr 7, 2020

It doesn't look to be (PyQt5 vs PySide2 and not sip related). The issue lies with PySide2 and shiboken,specifically the way that PySide2 loads shiboken with the new version. It is looking for the module as an actual file. I don't think the update is even capable of finding a shiboken that's in a library,zip. It also works fine with earlier versions of PySide2, which use a different method of loading shiboken ( such as import... which the new pyside2 doesn't even try).

As such I did report the issue to Qt, as from the looks of the error and surrounding code, it very much looks like "their fault".

I only posted here because they linked me here and I hope to get the issue rolling along.

Edit: I use cx_freeze with plenty other projects (thank you for an amazing module btw). The only thing that ever breaks is Qt.

@boralprophecy
Copy link

Still facing this issue. Can a new version be published to pip please.

@alexdelorenzo
Copy link

Encountering this issue as well on Python 3.8 on both Linux and Windows.

@codeyourdream
Copy link

Got this issue on Windows with Python 3.8.

@monkeyman51
Copy link

@Berserker66 No, this issue is a simple command line cxfreeze that has a error. If you use a setup, you do not need this. If you use python setup.py build, you do not need this.
In your bug report at pyside, I see that you use py38 to build but you reference py36 hardcoded in your setup.

Used the cxfreeze-quickstart command and created the setup.py successfully. What steps are needed next in order to launch the executable file on a different system?

@monkeyman51
Copy link

Encountering this issue as well on Python 3.8 on both Linux and Windows.

Did you run the cxfreeze-quickstart command?

@marcelotduarte
Copy link
Owner

@monkeyman51 @Berserker66 @codeyourdream @alexdelorenzo
cx_Freeze 6.2 has just been released and merged the solution to this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests