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: tuple indices must be integers or slices, not tuple #1067

Closed
xigrug opened this issue Jun 24, 2019 · 1 comment
Closed

TypeError: tuple indices must be integers or slices, not tuple #1067

xigrug opened this issue Jun 24, 2019 · 1 comment
Labels
Area: Calc Pertains to calculations Area: Units Pertains to unit information Status: Duplicate Duplicates an existing issue Type: Bug Something is not working like it should

Comments

@xigrug
Copy link

xigrug commented Jun 24, 2019

I try to run the same code in the video

from datetime import datetime
import pandas as pd
from metpy.units import units
from siphon.simplewebservice.wyoming import WyomingUpperAir
import metpy.calc as mpcalc
df = WyomingUpperAir.request_data(datetime(2012,4,14,12),"OUN")
p = df['pressure'].values * units(df.units['pressure'])
T = df['temperature'].values * units(df.units['temperature'])
Td = df['dewpoint'].values * units(df.units['dewpoint'])
mpcalc.surface_based_cape_cin(p, T, Td)
  • TypeError: tuple indices must be integers or slices, not tuple

    • Python 3.6.7
    • ` metpy 0.10.0'
@zbruick
Copy link
Contributor

zbruick commented Jun 24, 2019

This is a duplicate of #997. This issue is caused by pint 0.9, and a fix is coming in the next release of MetPy. In the meantime, if you downgrade pint to 0.8.1, everything should work again.

@zbruick zbruick closed this as completed Jun 24, 2019
@dopplershift dopplershift added Area: Calc Pertains to calculations Area: Units Pertains to unit information Status: Duplicate Duplicates an existing issue Type: Bug Something is not working like it should labels Sep 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Calc Pertains to calculations Area: Units Pertains to unit information Status: Duplicate Duplicates an existing issue Type: Bug Something is not working like it should
Projects
None yet
Development

No branches or pull requests

3 participants