building errors with py2exe

I

Intaek LIM

i'd tried to build my work with py2exe.
my work consisted of:

D:\temp\main.py
D:\temp\ui\__init__.py (contains __all__=['dlg','dlgevent']
D:\temp\ui\dlg.py
D:\temp\ui\dlgevent.py
D:\temp\mymod\__init__.py (contains __all__=['session','sessionevent']
D:\temp\mymod\auth.py
D:\temp\mymod\session.py
D:\temp\mymod\sessionevent.py


i wrote build file like ths:

#build.py
from distutils.core import setup
import py2exe

setup(console=["main.py"])


then, i typed two commands as follows:
D:\Temp>SET PYTHONPATH=D:\Temp
D:\Temp>python build.py py2exe


a bunch of files created under 'dist' and 'build'
once i executed main.exe under 'dist', the result was,

Traceback <most recent call alst>:
File "main.py", line 1, in ?
AttributeError: 'module' object has no attribute 'auth'


in build log, py2exe only includes two __init__.py files and
does not include anything else in the same folder.

how do i solve this?


Lim.
 
P

Peter Hansen

Intaek said:
once i executed main.exe under 'dist', the result was,
Traceback <most recent call alst>:
File "main.py", line 1, in ?
AttributeError: 'module' object has no attribute 'auth'

What does that line of code look like?

What happens when you run the program normally, without
using py2exe?

-Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top