[egenix-users] Problems deploying mx.DateTime

Weverton Gomes weverton at gmail.com
Tue Jul 22 17:12:25 CEST 2008


I've tryied py2exe, but I'm still getting the error: "No module name
string". Where can I find this module?? Is missing any .pyd file??

Thanks,

2008/7/22 Weverton Gomes <weverton at gmail.com>:

> I'm going to look better the py2exe.
>
> Where can I find the string module??
>
>
> 2008/7/22 M.-A. Lemburg <mal at egenix.com>:
>
>> [Please keep egenix-users on CC]
>>
>> On 2008-07-22 19:40, Weverton Gomes wrote:
>>
>>> I'm deploing a zip file and not a exe because I have another app in
>>> Delphi
>>> who integrates with this app in Python through Python4Delphi.
>>>
>>
>> That's fine, but py2exe does in fact build a program.zip file
>> with the Python code that it places into a directory with the needed
>> DLLs.
>>
>> What it does nicely is to find all your module dependencies ...
>>
>>  When I put the mxDateTime pyd file inside my Delphi app dir, the error
>>> change. Now it is:
>>>
>>> Traceback (most recent call last):
>>>  File "<string>", line 1, in <module>
>>>  File "C:\Program Files\Tron\Folha\Folha.pyz\engine\__init__.py", line 3,
>>> in <module>
>>>  File "C:\Program Files\Tron\Folha\Folha.pyz\engine\general\__init__.py",
>>> line 3, in <module>
>>>  File "C:\Program
>>> Files\Tron\Folha\Folha.pyz\engine\general\date_utils.py",
>>> line 8, in <module>
>>>  File "C:\Program Files\Tron\Folha\Folha.pyz\mx\DateTime\__init__.py",
>>> line
>>> 8, in <module>
>>>  File "C:\Program Files\Tron\Folha\Folha.pyz\mx\DateTime\DateTime.py",
>>> line
>>> 28, in <module>
>>>  File "C:\Program Files\Tron\Folha\Folha.pyz\mx\DateTime\DateTime.py",
>>> line
>>> 31, in modinit
>>> ImportError: No module named string
>>>
>>
>> Well, then add the string module as well :-)
>>
>>
>>  2008/7/22 M.-A. Lemburg <mal at egenix.com>:
>>>
>>>  On 2008-07-22 19:14, Weverton Gomes wrote:
>>>>
>>>>  I'm just making a zip file. Inside it there are the following folders:
>>>>>
>>>>> elementtree
>>>>> engine => (my app)
>>>>> kinterbasdb
>>>>> mx
>>>>>
>>>>> About mxDateTime.pyd, I already tried erase all other files (.py, .h,
>>>>> .c)
>>>>> inside mx.DateTime.mxDateTime and leaving only mxDateTime.pyd.
>>>>>
>>>>>  Why would you do that ?
>>>>
>>>>  When I did
>>>>
>>>>> this, I got the following error:
>>>>>
>>>>> Traceback (most recent call last):
>>>>> File "<string>", line 1, in <module>
>>>>> File "C:\Program Files\Tron\Folha\Folha.pyz\engine\__init__.py", line
>>>>> 3,
>>>>> in
>>>>> <module>
>>>>> File "C:\Program
>>>>> Files\Tron\Folha\Folha.pyz\engine\general\__init__.py",
>>>>> line 3, in <module>
>>>>> File "C:\Program
>>>>> Files\Tron\Folha\Folha.pyz\engine\general\date_utils.py",
>>>>> line 8, in <module>
>>>>> File "C:\Program Files\Tron\Folha\Folha.pyz\mx\DateTime\__init__.py",
>>>>> line
>>>>> 8, in <module>
>>>>> File "C:\Program Files\Tron\Folha\Folha.pyz\mx\DateTime\DateTime.py",
>>>>> line
>>>>> 9, in <module>
>>>>> ImportError: No module named mxDateTime
>>>>>
>>>>> I tryied, too, put mxDateTime.pyd on root of zip file, I got the same
>>>>> error.
>>>>> What is wrong with my deploy structure??
>>>>>
>>>>>  It doesn't contain the files that are really needed for deployment.
>>>>
>>>> Instead of copying the source directory into your ZIP file, you
>>>> should copy the installed version there, ie. what you find in
>>>> C:\Python2.5\Lib\site-packages\mx\
>>>>
>>>> Since Windows cannot load DLLs from ZIP files, you'll need to
>>>> place the mxDateTime.pyd file into a directory on sys.path.
>>>>
>>>> BTW: You can avoid all these problems by using a tool like py2exe
>>>> which will take care of bundling everything for you.
>>>>
>>>>
>>>>
>>>>  Thanks,
>>>>
>>>>>
>>>>> 2008/7/22 M.-A. Lemburg <mal at egenix.com>:
>>>>>
>>>>>  On 2008-07-22 17:53, Weverton Gomes wrote:
>>>>>
>>>>>>  Hi,
>>>>>>
>>>>>>> I'm trying to deploy an application I've made, in a zip file. So, I
>>>>>>> added
>>>>>>> the folder mx (who is inside Python25\Lib\site-packages) but, when I
>>>>>>> try
>>>>>>> to
>>>>>>> run my app, I get the following error:
>>>>>>>
>>>>>>> **** You don't have the (right) mxDateTime binaries installed
>>>>>>>
>>>>>>>  You get this error if Python cannot find the mxDateTime.pyd file
>>>>>>> which
>>>>>>>
>>>>>> should be in the folder mx\DateTime\mxDateTime\.
>>>>>>
>>>>>>  Traceback (most recent call last):
>>>>>>
>>>>>>  File "<string>", line 1, in <module>
>>>>>>> File "C:\Program Files\Tron\Folha\Folha.pyz\engine\__init__.py", line
>>>>>>> 3,
>>>>>>> in
>>>>>>> <module>
>>>>>>> File "C:\Program
>>>>>>> Files\Tron\Folha\Folha.pyz\engine\general\__init__.py",
>>>>>>> line 3, in <module>
>>>>>>> File "C:\Program
>>>>>>> Files\Tron\Folha\Folha.pyz\engine\general\date_utils.py",
>>>>>>> line 8, in <module>
>>>>>>> File "C:\Program Files\Tron\Folha\Folha.pyz\mx\DateTime\__init__.py",
>>>>>>> line
>>>>>>> 8, in <module>
>>>>>>> File "C:\Program Files\Tron\Folha\Folha.pyz\mx\DateTime\DateTime.py",
>>>>>>> line
>>>>>>> 9, in <module>
>>>>>>> File "C:\Program
>>>>>>> Files\Tron\Folha\Folha.pyz\mx\DateTime\mxDateTime\__init__.py", line
>>>>>>> 13,
>>>>>>> in
>>>>>>> <module>
>>>>>>>
>>>>>>> What can I do to solve this problem??
>>>>>>>
>>>>>>>  Well, it would help if you'd tell *how* you are deploying mxDateTime
>>>>>>>
>>>>>> :-)
>>>>>> E.g. whether you are using py2exe, a custom installer, etc.
>>>>>>
>>>>>> --
>>>>>> Marc-Andre Lemburg
>>>>>> eGenix.com
>>>>>>
>>>>>> Professional Python Services directly from the Source  (#1, Jul 22
>>>>>> 2008)
>>>>>>
>>>>>>  Python/Zope Consulting and Support ...        http://www.egenix.com/
>>>>>>>
>>>>>>>> mxODBC.Zope.Database.Adapter ...
>>>>>>>>> http://zope.egenix.com/
>>>>>>>>> mxODBC, mxDateTime, mxTextTools ...
>>>>>>>>> http://python.egenix.com/
>>>>>>>>>
>>>>>>>>> ________________________________________________________________________
>>>>>>
>>>>>> :::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX for free !
>>>>>> ::::
>>>>>>
>>>>>>
>>>>>>  eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
>>>>>>  D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
>>>>>>         Registered at Amtsgericht Duesseldorf: HRB 46611
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>  --
>>>> Marc-Andre Lemburg
>>>> eGenix.com
>>>>
>>>> Professional Python Services directly from the Source  (#1, Jul 22 2008)
>>>>
>>>>>  Python/Zope Consulting and Support ...        http://www.egenix.com/
>>>>>>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
>>>>>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
>>>>>>>
>>>>>>
>>>> ________________________________________________________________________
>>>>
>>>> :::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX for free ! ::::
>>>>
>>>>
>>>>  eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
>>>>   D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
>>>>          Registered at Amtsgericht Duesseldorf: HRB 46611
>>>>
>>>>
>>>
>>>
>>>
>> --
>> Marc-Andre Lemburg
>> eGenix.com
>>
>> Professional Python Services directly from the Source  (#1, Jul 22 2008)
>> >>> Python/Zope Consulting and Support ...        http://www.egenix.com/
>> >>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
>> >>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
>> ________________________________________________________________________
>>
>> :::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX for free ! ::::
>>
>>
>>   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
>>    D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
>>           Registered at Amtsgericht Duesseldorf: HRB 46611
>>
>
>
>
> --
> Weverton Gomes de Morais
> Tecnólogo em Redes de Comunicação
> Desenvolvedor Delphi
> Entusiasta Ruby/Rails
> "Todos juntos somos fortes"
>



-- 
Weverton Gomes de Morais
Tecnólogo em Redes de Comunicação
Desenvolvedor Delphi
Entusiasta Ruby/Rails
"Todos juntos somos fortes"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /mailman-archives/egenix-users/attachments/20080722/6f1aaad1/attachment.htm


More information about the egenix-users mailing list