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

Fix 'argument to reversed() must be a sequence' #4237

Merged
merged 1 commit into from
Jan 18, 2018

Conversation

mistercrunch
Copy link
Member

When passing empty/null location data out of certain rows in the spatial
control, Superset raises an error when trying to reverse the tuple.

When passing empty/null location data out of certain rows in the spatial
control, Superset raises an error when trying to reverse the tuple.
@@ -1852,7 +1852,10 @@ def process_spatial_data_obj(self, key, df):
elif spatial.get('type') == 'delimited':
df[key] = (df[spatial.get('lonlatCol')].str.split(spatial.get('delimiter')))
if spatial.get('reverseCheckbox'):
df[key] = [list(reversed(item))for item in df[key]]
df[key] = [
tuple(reversed(o)) if isinstance(o, (list, tuple)) else (0, 0)
Copy link
Member

@hughhhh hughhhh Jan 18, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way for us to give the user a warning about that some of the reversed values weren't converted properly?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'd be somewhat tricky from this context. On the JS side we can notify.warning("Foo bar") but there are no easy mechanics from this context.

@hughhhh
Copy link
Member

hughhhh commented Jan 18, 2018

🚢

@mistercrunch mistercrunch merged commit 36caca3 into apache:master Jan 18, 2018
michellethomas pushed a commit to michellethomas/panoramix that referenced this pull request May 24, 2018
When passing empty/null location data out of certain rows in the spatial
control, Superset raises an error when trying to reverse the tuple.
wenchma pushed a commit to wenchma/incubator-superset that referenced this pull request Nov 16, 2018
When passing empty/null location data out of certain rows in the spatial
control, Superset raises an error when trying to reverse the tuple.
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.23.0 labels Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.23.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants