UDST / urbansim

Platform for building statistical models of cities and regions
https://udst.github.io/urbansim/
BSD 3-Clause "New" or "Revised" License
483 stars 132 forks source link

DataFrame Explorer ValueError #204

Open HLC-CUUATS opened 7 years ago

HLC-CUUATS commented 7 years ago

Hi Everyone,

I originally made this post on the SanFran_Urbansim git but it seems like those forums have been pretty inactive recently and the source of my error seems to be coming from "..\urbansim\maps\dframe_explorer.py".

I've been trying to run the SanFran_Urbansim DataFrame Explorer with my own data. I have run into the same "Query Failed" message whenever I try to access some of the drop down tables in the explorer (specifically 'buildings', 'jobs', and 'households')

I also tried running the original SanFran_Urbansim code from this github to see if it was an issue related to the code I changed but it still has the same errors.

The following is the ValueError message that keeps showing up:

Traceback (most recent call last):
File "C:\Users\hlc42705\AppData\Local\Continuum\Anaconda2\lib\site-packages\bottle.py", line 862, in _handle
return route.call(**args)
File "C:\Users\hlc42705\AppData\Local\Continuum\Anaconda2\lib\site-packages\bottle.py", line 1740, in wrapper
rv = callback(*a, **ka)
File "C:\Users\hlc42705\AppData\Local\Continuum\Anaconda2\lib\site-packages\urbansim\maps\dframe_explorer.py", line 47, in map_query
results = {int(k): results[k] for k in results}
File "C:\Users\hlc42705\AppData\Local\Continuum\Anaconda2\lib\sitepackages\urbansim\maps\dframe_explorer.py", line 47, in 
results = {int(k): results[k] for k in results}
ValueError: invalid literal for int() with base 10: '146.0'
127.0.0.1 - - [29/Jun/2017 09:05:35] "GET /map_query/households/empty/zone_id/building_type_id/mean() HTTP/1.1" 500 1812

Based off of the error it looks like the issue stems from the urbansim package in line 47 of dframe_explorer.py; any ideas of how to fix this or if i'm doing something wrong when I run the explorer?

I do have the most recent updated version of urbansim (via pip install/update).

JesusHe19 commented 5 years ago

Hi I am also facing the same issue. Did anyone find any kind of solution?

jadamsson commented 2 years ago

This is an old thread, but I hit this same issue. Was there any resolution for this?