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

still got python3 compatibility issue in segmentation scripts #3091

Closed
XIAOYixuan opened this issue Mar 12, 2019 · 3 comments
Closed

still got python3 compatibility issue in segmentation scripts #3091

XIAOYixuan opened this issue Mar 12, 2019 · 3 comments
Labels

Comments

@XIAOYixuan
Copy link
Contributor


for source_idx in range(num_sources):

I tried this new script recently and my program crashed at line 134(as referenced above), the error log says num_sources is not an int.
In python 3, though both len(row) and dim are ints, and len(row) is divisible by dim, the type of the result is still "float", which caused that error.
divi

@danpovey
Copy link
Contributor

I think if you put c = a // b it should work. Can you also change the shebang (first line) to python3, remove the from __future__ statements (no longer needed), re-test, and if it works, make a PR?

@XIAOYixuan
Copy link
Contributor Author

sure, I'm re-testing now

@kkm000
Copy link
Contributor

kkm000 commented Mar 19, 2019

Fixed in #3094.

@kkm000 kkm000 closed this as completed Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants