New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"ImportError: No module named cola.app" when running git-cola from the source-tree under non-ASCII path under Windows #302

Closed
Vdragon opened this Issue Jun 14, 2014 · 0 comments

Comments

Projects
None yet
1 participant
@Vdragon
Contributor

Vdragon commented Jun 14, 2014

I encountered issue #282 again in Microsoft Windows so I cloned the commit 2130459 version of git-cola trying to workaround it. Here's the traceback.

Traceback (most recent call last):             
  File "bin/git-cola", line 51, in <module>    
    from cola.app import add_common_arguments  
ImportError: No module named cola.app          

Reproduce steps

  1. find a Microsoft Windows command prompt
  2. copy git-cola/ 軟體/git-cola
  3. python 軟體/git-cola/bin/git-cola

Reporter's environment

  • Windows 8.1 64-bit x86 (version 6.3 (build 9600))
  • Python 2.7.7(64-bit x86) is in the %PATH%
  • Locale
    • Codepage 950(Big5)

davvid added a commit to davvid/git-cola that referenced this issue Jun 15, 2014

compat: add PY2 and WIN32 symbols
Related-to: #302

Signed-off-by: David Aguilar <davvid@gmail.com>

davvid added a commit to davvid/git-cola that referenced this issue Jun 15, 2014

core: use the Windows unicode API when accessing paths
win32 requires unicode strings to properly work with file paths.

Add a mkpath() helper function that transforms its arguments into bytes
for UNIX and unicode for Windows.

Use mkpath() in all of the core wrapper functions.

Related-to: #302

Signed-off-by: David Aguilar <davvid@gmail.com>

davvid added a commit to davvid/git-cola that referenced this issue Jun 15, 2014

win32: support launching git-cola from non-ascii paths
Adjust the startup scripts so that byte strings are used on python2 when
concatenating paths.  This avoids unicode decode errors and ensures that
we find the correct paths on Windows when doing the sys.path setup.

Related-to: #302
Reported-by: V字龍(Vdragon) <pika1021@gmail.com>
Signed-off-by: David Aguilar <davvid@gmail.com>

@davvid davvid closed this in 34b45ef Jun 15, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment