Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

A physicist is an atom's way of knowing about atoms. -- George Wald


devel / comp.lang.python / Re: Problem using cx_Freeze

SubjectAuthor
* Re: Problem using cx_FreezeDavid at Booomer
`- Re: Problem using cx_FreezeDennis Lee Bieber

1
Re: Problem using cx_Freeze

<mailman.270.1660608114.20444.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19214&group=comp.lang.python#19214

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: dav...@boomer.org (David at Booomer)
Newsgroups: comp.lang.python
Subject: Re: Problem using cx_Freeze
Date: Mon, 15 Aug 2022 18:00:48 -0600
Lines: 80
Message-ID: <mailman.270.1660608114.20444.python-list@python.org>
References: <F215A38E-90EF-4F01-B05C-AACD4B2AE4D0@boomer.org>
<1D0DEA52-E8D7-42EF-8CB5-07EADDB1ED8A@sbcglobal.net>
<C1F3654D-18CB-4D8C-AF77-5B61AC678112@boomer.org>
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\))
Content-Type: text/plain;
charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Trace: news.uni-berlin.de k2fBDW/2L3P6jJll9auVKge2gUknmyQ2yq2mCOr6l9uw==
Return-Path: <david@boomer.org>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=none reason="no signature";
dkim-adsp=none (unprotected policy); dkim-atps=neutral
X-Spam-Status: OK 0.000
X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'message:': 0.03; 'def':
0.04; 'iphone': 0.05; 'parameter': 0.05; 'searching': 0.05; 'aug':
0.07; 'anaconda': 0.09; 'cc:addr:python-list': 0.09; 'instances':
0.09; 'skip:_ 20': 0.09; 'terminal': 0.09; 'url-
ip:151.101.0.223/32': 0.09; 'url-ip:151.101.128.223/32': 0.09;
'url-ip:151.101.192.223/32': 0.09; 'url-ip:151.101.64.223/32':
0.09; 'cc:no real name:2**0': 0.14; 'import': 0.15; 'url:mailman':
0.15; '.py': 0.16; '2022,': 0.16; 'arguments': 0.16; 'command:':
0.16; 'executable': 0.16; 'init': 0.16; 'received:71': 0.16;
'setup,': 0.16; 'suggestions,': 0.16; 'url:latest': 0.16;
'url:project': 0.16; 'url:pypi': 0.16; 'wrote:': 0.16; 'python':
0.16; 'pm,': 0.19; 'cc:addr:python.org': 0.20; 'option': 0.20;
'issue': 0.21; 'skip:_ 10': 0.22; '\xe2\x80\x94': 0.22; 'code':
0.23; 'subject:using': 0.23; 'url-ip:188.166.95.178/32': 0.25;
'url-ip:188.166.95/24': 0.25; 'url:listinfo': 0.25; 'cc:2**0':
0.25; 'url-ip:188.166/16': 0.25; 'tried': 0.26; 'output': 0.28;
'error': 0.29; 'takes': 0.31; 'module': 0.31; 'url-ip:188/8':
0.31; 'answers': 0.32; 'resolve': 0.32; 'but': 0.32; 'there':
0.33; 'same': 0.34; 'header:In-Reply-To:1': 0.34; 'running': 0.34;
'trying': 0.35; 'url-ip:104.17/16': 0.35; 'url:)': 0.35; 'files':
0.36; 'thanks,': 0.36; 'couple': 0.37; 'using': 0.37; 'class':
0.37; 'file': 0.38; 'thanks': 0.38; 'two': 0.39; 'list': 0.39;
'use': 0.39; 'appears': 0.40; 'including': 0.60; 'gives': 0.62;
'url-ip:151.101.0/24': 0.62; 'url-ip:151.101.128/24': 0.62; 'url-
ip:151.101.192/24': 0.62; 'url-ip:151.101.64/24': 0.62; 'skip:m
20': 0.63; 'your': 0.64; '8bit%:43': 0.70; 'skip:\xe2 10': 0.71;
'longer': 0.71; 'received:secureserver.net': 0.84; 'attribute':
0.84; 'received:198.71': 0.84; 'received:198.71.225': 0.84;
'received:iad2.secureserver.net': 0.84;
'received:prod.iad2.secureserver.net': 0.84; 'whole.': 0.84;
'skip:q 30': 0.91
X-CMAE-Analysis: v=2.4 cv=ZsUol/3G c=1 sm=1 tr=0 ts=62fade32
a=ntNDXrUKbnX6i/WnlW3SyQ==:117 a=psjRqFsbmtbLk4XyTHOYWg==:17
a=9+rZDBEiDlHhcck0kWbJtElFXBc=:19 a=gQX1269ULFhLm4Thdby34LUHVW0=:19
a=IkcTkHD0fZMA:10 a=biHskzXt2R4A:10 a=UXIAUNObAAAA:8 a=pcLIrrrKAAAA:8
a=BtVssYORAAAA:8 a=CckQENj0AAAA:8 a=8AHkEIZyAAAA:8 a=F8-NB6fv0bI5jmp0MZQA:9
a=QEXdDO2ut3YA:10 a=tZ03TVbMKvEA:10 a=v1m5V3URgRWkQSIvPHXJ:22
a=hSMz_C7qHR9F5UrFlbsW:22 a=-XWihg8NfbdYC9mmq4w4:22
X-SECURESERVER-ACCT: david@boomer.org
In-Reply-To: <1D0DEA52-E8D7-42EF-8CB5-07EADDB1ED8A@sbcglobal.net>
X-Mailer: Apple Mail (2.3696.120.41.1.1)
X-AntiAbuse: This header was added to track abuse,
please include it with any abuse report
X-AntiAbuse: Primary Hostname - a2plcpnl0158.prod.iad2.secureserver.net
X-AntiAbuse: Original Domain - python.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - boomer.org
X-Get-Message-Sender-Via: a2plcpnl0158.prod.iad2.secureserver.net: authenticated_id:
david@boomer.org
X-Authenticated-Sender: a2plcpnl0158.prod.iad2.secureserver.net: david@boomer.org
X-Source:
X-Source-Args:
X-Source-Dir:
X-CMAE-Envelope: MS4xfDpMlnoj2p1aA+gY5y+dzHNddweDkMynRuyvS0Nc39hYApdnJA1pdobGmmo4j0fOX8rN18U2/n3PPwwUOGVhcSbbrTY5YcDIZn/j+1ZauoQxVULXfTJE
KE8o/P2jNkXhdMrF9AoKyprL07XTEQQyAG/PWJMMAS6h2WtuQlplnpB6C6UaRVYoYRXMG3rnu3/J79F0jZvvtdxY6UrjklORAmXPSNfk2qzE9s2+/rVjjS8N
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <C1F3654D-18CB-4D8C-AF77-5B61AC678112@boomer.org>
X-Mailman-Original-References: <F215A38E-90EF-4F01-B05C-AACD4B2AE4D0@boomer.org>
<1D0DEA52-E8D7-42EF-8CB5-07EADDB1ED8A@sbcglobal.net>
 by: David at Booomer - Tue, 16 Aug 2022 00:00 UTC

Hi Jim

Thanks for your suggestions.

I changed

from cx_Freeze import *

to

from cx_Freeze import setup, Executable

And no longer get the BdistDMG error


I had found the page
https://cx-freeze.readthedocs.io/en/latest/setup_script.html
But hadn’t tried the setup, Executable option in the from statement

However I now get an error

init() takes from 2 to 12 positional arguments but 14 were given

I found a couple instances of init in two .py files that were part of the whole.

One .py file
def __init__(self):

Another .py file
class Aboutwindow(QtGui.QMainWindow, Ui_Aboutwindow):
def __init__(self,parent=None):
QtGui.QMainWindow.__init__(self,parent)

class Main(QtGui.QMainWindow):

def __init__(self):
QtGui.QMainWindow.__init__(self)

When searching for this error the answers found suggested including self in the init parameter list but the code already has self.

Thanks, David

> On Aug 15, 2022, at 5:51 PM, Jim Schwartz <jschwar@sbcglobal.net> wrote:
>
> This link covers how to use BDist_dmg.
>
> https://cx-freeze.readthedocs.io/en/latest/setup_script.html
>
> Sent from my iPhone
>
>> On Aug 15, 2022, at 12:11 PM, David at Booomer <david@boomer.org> wrote:
>>
>> I’m trying to use cx_Freeze (https://pypi.org/project/cx-Freeze/) in a python app but running into an error message:
>>
>> AttributeError: module 'cx_Freeze' has no attribute ‘BdistDMG’
>>
>> I’m using Anaconda and error appears with the import command: from cx_Freeze import *
>>
>> From the terminal the command: python setup.py build gives much the same error.
>>
>> I believe there is an issue specifying the output file name but don’t know how to resolve it.
>>
>> Any suggestions, thanks. David
>>
>>
>> --
>> https://mail.python.org/mailman/listinfo/python-list

Re: Problem using cx_Freeze

<b0vlfhpmrmnl1clohm5mjfhj5jhi4bqkl6@4ax.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19215&group=comp.lang.python#19215

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border-2.nntp.ord.giganews.com!nntp.giganews.com!Xl.tags.giganews.com!local-1.nntp.ord.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date: Tue, 16 Aug 2022 02:17:39 +0000
From: wlfr...@ix.netcom.com (Dennis Lee Bieber)
Newsgroups: comp.lang.python
Subject: Re: Problem using cx_Freeze
Date: Mon, 15 Aug 2022 22:18:54 -0400
Organization: IISS Elusive Unicorn
Message-ID: <b0vlfhpmrmnl1clohm5mjfhj5jhi4bqkl6@4ax.com>
References: <F215A38E-90EF-4F01-B05C-AACD4B2AE4D0@boomer.org> <1D0DEA52-E8D7-42EF-8CB5-07EADDB1ED8A@sbcglobal.net> <C1F3654D-18CB-4D8C-AF77-5B61AC678112@boomer.org> <mailman.270.1660608114.20444.python-list@python.org>
User-Agent: ForteAgent/8.00.32.1272
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 33
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-jJOgxJS90/HVWPZVQeqwuiGQdycJIMjMEvuvvfXBZVoIbX/ny0ZjfmM1ezIOaIZtZQyndwavKKrLjxU!NxDYDi2PNLjW7LCx6EhOSZ4u/b7QMhaerlN5p1AXOler+5fX5k3iGoIgCUsEGHv7ieY71Q1X
X-Complaints-To: abuse@giganews.com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
 by: Dennis Lee Bieber - Tue, 16 Aug 2022 02:18 UTC

On Mon, 15 Aug 2022 18:00:48 -0600, David at Booomer <david@boomer.org>
declaimed the following:

>However I now get an error
>
>init() takes from 2 to 12 positional arguments but 14 were given
>
>I found a couple instances of init in two .py files that were part of the whole.
>
>One .py file
>def __init__(self):
>

Please cut&paste the TEXT of the console where the errors are displayed
-- don't paraphrase!

init() is NOT the same as __init__()

WHAT "One .py file"? This is a meaningless bit of information.

The most likely __init__() involved is the one where
cx_Freeze.Executable is instantiated.
https://cx-freeze.readthedocs.io/en/latest/setup_script.html#cx-freeze-executable
shows 11 parameters (and "self" would make the 12th).

--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com http://wlfraed.microdiversity.freeddns.org/

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor