Bug 331484 - Error on generating Python code repositories
Summary: Error on generating Python code repositories
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: 2.11.5
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Erik Rakhorst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-25 09:18 UTC by FrViPofm
Modified: 2014-04-18 23:24 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.12.5


Attachments
do not enforce first capital letter for python packages. (1.35 KB, patch)
2014-04-18 22:25 UTC, Erik Rakhorst
Details

Note You need to log in before you can comment on or make changes to this bug.
Description FrViPofm 2014-02-25 09:18:56 UTC
On generating python code with packages (e.g. : modules) , Umbrello creates the right directories (withour caps : modules) but send an error message with :
"Cannot open file /home/[...]/code/Modules/Site.py for writing. Please make sure the folder exists and you have permissions to write to it." looking for a wrong directory.

Reproducible: Always
Comment 1 Erik Rakhorst 2014-04-18 22:25:18 UTC
Created attachment 86160 [details]
do not enforce first capital letter for python packages.

I received the same error for some packages that were written in all lowercase. After exploring the code I discovered that a naming convention is enforced during the export. The first letter of a package is always converted to a capital letter.

For me this is not te place to enforce this. After removing the code that does that I could succesfully generate my project without errors. 

Attached is a patch with my changes.
Comment 2 Ralf Habacker 2014-04-18 23:19:42 UTC
Git commit c2f0e8d385cea53391a747805c9172b1dd2d2141 by Ralf Habacker, on behalf of Erik Rakhorst.
Committed on 18/04/2014 at 23:10.
Pushed by habacker into branch 'master'.

Do not enforce first capital letter for python packages.

M  +0    -9    umbrello/codegenerators/python/pythonwriter.cpp

http://commits.kde.org/umbrello/c2f0e8d385cea53391a747805c9172b1dd2d2141
Comment 3 Ralf Habacker 2014-04-18 23:21:41 UTC
Git commit 38dd2a42c57af1a4e650a939d2cd9ac754c8b8f9 by Ralf Habacker, on behalf of Erik Rakhorst.
Committed on 18/04/2014 at 23:10.
Pushed by habacker into branch 'KDE/4.13'.

Do not enforce first capital letter for python packages.
FIXED-IN:4.13.0
(cherry picked from commit c2f0e8d385cea53391a747805c9172b1dd2d2141)

M  +0    -9    umbrello/codegenerators/python/pythonwriter.cpp

http://commits.kde.org/umbrello/38dd2a42c57af1a4e650a939d2cd9ac754c8b8f9
Comment 4 Ralf Habacker 2014-04-18 23:23:00 UTC
Git commit 26558402037ad8a34c536248a2b2bf52ce6af204 by Ralf Habacker, on behalf of Erik Rakhorst.
Committed on 18/04/2014 at 23:10.
Pushed by habacker into branch 'KDE/4.12'.

Do not enforce first capital letter for python packages.
FIXED-IN:4.12.5
(cherry picked from commit c2f0e8d385cea53391a747805c9172b1dd2d2141)

M  +0    -9    umbrello/codegenerators/python/pythonwriter.cpp

http://commits.kde.org/umbrello/26558402037ad8a34c536248a2b2bf52ce6af204