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

Python 3 Support? #78

Closed
mitsest opened this issue Mar 29, 2015 · 12 comments · Fixed by #86
Closed

Python 3 Support? #78

mitsest opened this issue Mar 29, 2015 · 12 comments · Fixed by #86

Comments

@mitsest
Copy link

mitsest commented Mar 29, 2015

Hey,
is this on your to-do list? If not, I could fork it and run 2to3 (and debug) for you

Thanks!

@coderholic
Copy link
Owner

Sure thing, please do!

On Sunday, March 29, 2015, Dimitris Korompos notifications@github.com
wrote:

Hey,
is this on your to-do list? If not, I could fork it and run 2to3 (and
debug) for you

Thanks!


Reply to this email directly or view it on GitHub
#78.

@DylanLukes
Copy link

It's diverged quite a bit, but yourlabs/django-cities-light is still a fork, and does have Python 3 support. If anything, that means it's possible.

It may be worth seeing what they've done to avoid problems.

@nbrede
Copy link

nbrede commented Jun 18, 2015

@mitsest Have you started / tried it?

@mitsest
Copy link
Author

mitsest commented Jun 19, 2015

nope, not yet. And I don't know if I 'll manage to find some time to do it :/
Sorry!

@illing2005
Copy link

I tried to include Python3 support in my fork.
It seems to work but is not completly tested:
https://github.com/illing2005/django-cities

@mbambafd
Copy link

mbambafd commented Jul 9, 2015

when run .manage.py --force --import=all i have strange error:
Exception: File not found and download failed: countryInfo.txt
i trying to solve it quickly if other person solve it before me please post.

@mbambafd
Copy link

mbambafd commented Jul 9, 2015

ok solved !
the installation document not give this specification !
django-cities required 7 files(that's it) it must copied in the django-cities package installation(something like this: site-package\django-cities\cities\data...7 files
now i have another error:
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 404: character maps to
i'm trying to solve it quickly ... if someone have solution before me please post.

@mbambafd
Copy link

mbambafd commented Jul 9, 2015

solved UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 404: character!
we have to update cities.py
i have override all line contain open function
-- line 117
-- line 132
-- line 137
i added mode='r', encoding="utf8" (eg: before in line 117 we have >> file = open(os.path.join(self.data_dir, filename), 'wb') after become file = open(os.path.join(self.data_dir, filename), 'wb', mode='r', encoding="utf8"))
It all !

@mbambafd
Copy link

mbambafd commented Jul 9, 2015

I take a time to manage all django-cities code to make it work on django 1.8 with python 3.4 correctly correctly !

@imposeren
Copy link
Contributor

That's great! Have you made a pull request with your solution?

@mbambafd
Copy link

I code a much softer version of django -cities now (for django and + 1.6 . ) . The goal is to make it a close package for location-based applications and once I finish I post we try to validate it all together.

@bashu
Copy link
Collaborator

bashu commented Aug 7, 2015

done, see related PR

coderholic added a commit that referenced this issue Aug 7, 2015
python 3 support, close #78, fix #80, fix #67
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.

8 participants