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

Unable to create dataset. #3

Open
Skylion007 opened this issue Aug 5, 2016 · 5 comments
Open

Unable to create dataset. #3

Skylion007 opened this issue Aug 5, 2016 · 5 comments

Comments

@Skylion007
Copy link

I am trying to get this example running, but unfortunately, I have run into a little bit of a snag. I keep getting this error when I attempt to run create_database.sh


File "scripts/create_dataset.py", line 122, in create_patches
    key = b'%010d' % keys[n_patches]
TypeError: ufunc 'remainder' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''

Any ideas on how to proceed?

@mitmul
Copy link
Owner

mitmul commented Aug 5, 2016

Could you tell me your environment (OS, versions of python and all related packages)?

@Skylion007
Copy link
Author

A Docker container I wrote to run this project running on CentOS. I can do you one better and provide the dockerfile if you want.

@Skylion007
Copy link
Author

See #5 for the Dockerfile.

@Skylion007
Copy link
Author

I have narrowed down the error. It is caused when you attempt to create the dataset for roads or roads_mini, buildings or merged. All --single and --multi work fine.

@Skylion007
Copy link
Author

Found the bug! It was a very obscure feature in Python3.5 called bytestring formatting. For ease of deployment, I was using Python 3.4 since Ubuntu 14.04 hadn't migrated over yet so the feature wasn't supported. Luckily you can backport it by replacing the line with this little hack.

key = bytes('%010d' % keys[n_patches], 'ascii')

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

No branches or pull requests

2 participants