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

TypeError: range() integer end argument expected, got float. #13

Open
seidlmic opened this issue Mar 31, 2015 · 6 comments
Open

TypeError: range() integer end argument expected, got float. #13

seidlmic opened this issue Mar 31, 2015 · 6 comments

Comments

@seidlmic
Copy link

This BUG is already mentioned in Pull Requests.

File "/var/www/dev/3data/minemap/map-layer/cgi-bin/tilecache-github/tilecache/TileCache/Client.py", line 117, in seed for y in range(startY, endY, stepY): TypeError: range() integer end argument expected, got float.

It is caused by commit from 2011 where a change in Layer.py was made

    x = int(x0)
    y = int(y0)

   -->

    x = round(x0)
    y = round(y0)

`
I think better solution then change line #117 in Client.py is to fix Layer.py by

    x = int(round(x0))
    y = int(round(y0))
@winkey
Copy link
Contributor

winkey commented Mar 31, 2015

a lillte history,

the change from round to cast a long time ago broke the server.
I changed it back in 2011, I am hesatant to mess with that

this is also why i asked for clarification and a bug report on that pull request.

@winkey
Copy link
Contributor

winkey commented Mar 31, 2015

is this related to your other bug? #14

the change from cast to round would cause that number to change perhaps seed should be using its own logic here?

it does no good to break the server to fix the client

@winkey
Copy link
Contributor

winkey commented Mar 31, 2015

link to that pull request on seed #8

@seidlmic
Copy link
Author

Acually I have no knowledge about TileCache. I just start to dig for reason why tilecache_seed.py creates strange protocols that does not reflect what is actually created.

Strange:

  • coordinates of tiles
  • total number of tiles
  • may be the first row is somewhat corrupted - not clear yet

It look that all of this is also connected with my "crazy" settings.
metatile=yes metasize=1,1 metabuffer=100
that I use as workaround of label problem at edges of tiles.

The #14 an #13 issues are just side efects.

Despite this i guess the x,y,z should be integers not floats.

@winkey
Copy link
Contributor

winkey commented Mar 31, 2015

metabuffer should be 2 ints, other than that you set it however big you need it, nothing crazy about that

@seidlmic
Copy link
Author

Thanks for hint. Maybe will help.

from tilecache.cfg

# metaBuffer=10 *** size of metatile buffer in px ***

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