Skip to content
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

Buildozer.spec 's title of your application can not be a Chinese character #284

Closed
dessant opened this issue Feb 6, 2016 · 2 comments · Fixed by #293
Closed

Buildozer.spec 's title of your application can not be a Chinese character #284

dessant opened this issue Feb 6, 2016 · 2 comments · Fixed by #293

Comments

@dessant
Copy link
Contributor

dessant commented Feb 6, 2016

Port of kivy/kivy#3683.

# Android packaging done!
# APK 中-1.0.0-debug.apk available in the bin directory
Traceback (most recent call last):
  File "/usr/local/bin/buildozer", line 9, in <module>
    load_entry_point('buildozer==0.30', 'console_scripts', 'buildozer')()
  File "/Library/Python/2.7/site-packages/buildozer/scripts/client.py", line 13, in main
    Buildozer().run_command(sys.argv[1:])
  File "/Library/Python/2.7/site-packages/buildozer/__init__.py", line 987, in run_command
    self.target.run_commands(args)
  File "/Library/Python/2.7/site-packages/buildozer/target.py", line 85, in run_commands
    func(args)
  File "/Library/Python/2.7/site-packages/buildozer/target.py", line 97, in cmd_debug
    self.buildozer.build()
  File "/Library/Python/2.7/site-packages/buildozer/__init__.py", line 198, in build
    self.target.build_package()
  File "/Library/Python/2.7/site-packages/buildozer/targets/android.py", line 735, in build_package
    self.buildozer.state['android:latestapk'] = apk
  File "/Library/Python/2.7/site-packages/buildozer/jsonstore.py", line 33, in __setitem__
    self.sync()
  File "/Library/Python/2.7/site-packages/buildozer/jsonstore.py", line 55, in sync
    fd.write(unicode(dumps(self.data, ensure_ascii=False)))
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 250, in dumps
    sort_keys=sort_keys, **kw).encode(obj)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/encoder.py", line 210, in encode
    return ''.join(chunks)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe4 in position 1: ordinal not in range(128)
@udiboy1209
Copy link
Contributor

I guess this is a ConfigParser issue in python 2.x. It doesn't support unicode. They closed it with WONTFIX 😕.

http://bugs.python.org/issue11597

@udiboy1209
Copy link
Contributor

That ConfigParser issue only applies when you're trying to write to a file and not read.

I realised we can use str.decode('utf-8') to get a unicode string from the ascii returned by read(). Working on a PR now.

udiboy1209 added a commit to udiboy1209/buildozer that referenced this issue Feb 25, 2016
Fix kivy#284
This commit only fixes target android
@tito tito closed this as completed in #293 Feb 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants