Missing marrow module

Issue #238 closed
Anonymous created an issue

Hi I am working with python 3.6 on Windows 10 I have succesfully been able to create an exe for my project Now I added the marrow mail package to this project That does run properly within Aptana Studio version 3 But after installation of the exe, the program wont start It gives an error "missing module marrow" I have been reading a lot of problems with that but cannot find a solution I am using the latest versiof of CX_Freeze During compiling it gives the following warning

? marrow.mailer imported from AnsichtWebMail ? marrow.mailer.address imported from AnsichtWebMail ? marrow.util.compat imported from AnsichtWebMail adding "marrow" to the package list does not help !!

This is my setup script import sys import importlib import cx_Freeze from cx_Freeze import setup, Executable from distutils.core import setup, Extension

from multiprocessing import Process


import os import os.path from os.path import exists from pathlib import Path

import tkinter import logging import logging.config import inspect #needed for the logger import glob

currentFile = 'setup.py' # May be 'my_script', or './my_script' or # '/home/user/test/my_script.py' depending on exactly how # the script was run/loaded. realPath = os.path.realpath(currentFile) workPath = os.path.dirname(realPath) print ('working path:',workPath)

this is needed to put the program in the destination folder

if 'bdist_msi' in sys.argv: sys.argv += ['--initial-target-dir', 'C:\Ansicht\']

def copy_dir(): dir_path = "Ansicht_Docu_bestanden" base_dir = os.path.join(workPath, dir_path) print ('basedir:',base_dir) for (dirpath, dirnames, files) in os.walk(base_dir): for f in files: #yield os.path.join(dirpath.split('/', 1)[1], f) yield os.path.join( f)

files = '.'

folders = workPath + '\Ansicht_Docu_bestanden'

datadir = "Ansicht_Docu_bestanden" data_files=[(d, [os.path.join(d, f) for f in files]) for d,folders,files in os.walk(datadir)] print ('datafiles:',data_files)

PythonPath = os.path.split(sys.executable)[0] #get python path

os.environ['TCL_LIBRARY'] = PythonPath + "\tcl\tcl8.6" os.environ['TK_LIBRARY'] = PythonPath + "\tcl\tk8.6" additional_mods = [ 'numpy.core._methods', 'numpy.lib.format','lxml.etree', 'lxml._elementpath']

addfiles = [os.path.join(PythonPath, 'DLLs', 'tk86t.dll'),

os.path.join(PythonPath, 'DLLs', 'tcl86t.dll'),

os.path.join('C:\Program Files\Aptana Studio 3\Workspaces', 'Ansichtkaartenhuis','AnsichtWeb.ini'),

os.path.join('C:\Program Files\Aptana Studio 3\Workspaces', 'Ansichtkaartenhuis','iconvieveen.ico'),

os.path.join('C:\Program Files\Aptana Studio 3\Workspaces', 'Ansichtkaartenhuis','logging.conf'),

os.path.join('C:\Program Files\Aptana Studio 3\Workspaces', 'Ansichtkaartenhuis','Ansicht_Docu.htm'),

os.path.join('C:\Program Files\Aptana Studio 3\Workspaces', 'Ansichtkaartenhuis','Ansicht_Docu.docx')]

addfiles = [os.path.join(PythonPath, 'DLLs', 'tk86t.dll'), os.path.join(PythonPath, 'DLLs', 'tcl86t.dll'), os.path.join(workPath,'AnsichtWeb.ini'), os.path.join(workPath,'iconvieveen.ico'), os.path.join(workPath,'logging.conf'), os.path.join(workPath,'Ansicht_Docu.htm'), os.path.join(workPath,'Ansicht_Docu.docx'), os.path.join(workPath,'mail_del_subj_nl.txt'), os.path.join(workPath,'mail_del_text_nl.txt'), os.path.join(workPath,'mail_del_subj_us.txt'), os.path.join(workPath,'mail_del_text_us.txt'), os.path.join(workPath,'mail_subj_nl.txt'), os.path.join(workPath,'mail_text_nl.txt'), os.path.join(workPath,'mail_subj_us.txt'), os.path.join(workPath,'mail_text_us.txt') ]

base = None if sys.platform == "win32": base = "Win32GUI"

shortcut_table = [ ("DesktopShortcut", # Shortcut "DesktopFolder", # Directory_ "Ansicht", # Name "TARGETDIR", # Component_ "[TARGETDIR]\Ansicht.exe",# Target None, # Arguments None, # Description None, # Hotkey None, # Icon None, # IconIndex None, # ShowCmd "TARGETDIR", # WkDir ) ]

Now create the table dictionary

msi_data = {"Shortcut": shortcut_table}

Change some default MSI options and specify the use of the above defined tables

bdist_msi_options = {'data': msi_data}

includes = [] includefiles = [] excludes = [] path = []
packages = ["AnsichtWebFunc","AnsichtWebVars","AnsichtWebProc","errno", "os", "sys","re", "stat", "subprocess","collections", "pprint","shutil"] build_exe_options = { "include_files" :addfiles, "includes" :additional_mods, "excludes" :excludes, "packages" :packages, "path" :path }

exe = [cx_Freeze.Executable('AnsichtWebMain.py', base=base, trademarks="Peter Smits Netherlands", copyright="Peter Smits 2017 (c)", shortcutName="Ansicht", shortcutDir="DesktopFolder", icon="iconvieveen.ico", targetName = "Ansicht.exe" ) ]

cx_Freeze.setup( name = "AnsichtWeb", version = "1.0", options = {"build_exe": {"packages": ["errno", "os", "re", "stat", "subprocess","collections", "pprint","shutil", "humanize","pycallgraph"], "include_files": []}}, executables = exe )

cx_Freeze.setup( name = "Ansicht", version = "1.19", author = "Peter Smits Copyricht (c) 2017", description = "AnsichtWeb is a program to maintain the Postcard database", #options = {"build_exe": {"packages": ["AnsichtWebVars","errno", "os", "sys","re", "stat", "subprocess","collections", "pprint","shutil"], "include_files": addfiles,"includes" :addtional_mods}}, options = {"bdist_msi": bdist_msi_options,"build_exe": build_exe_options}, #package_data={'Ansicht_Docu_bestanden': ['Ansicht_Docu_bestanden/*']}, data_files=(data_files), #data_files=[('Ansicht_Docu_bestanden', ['Ansicht_Docu_bestanden\filelist.xml','Ansicht_Docu_bestanden\header.htm'])], #data_files=[('Ansicht_Docu_bestanden', [{bestanden}])],

             executables = exe )

Comments (1)

  1. Log in to comment