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

ImportError: cannot import name 'PublicDataset' from 'policyengine_core.data' #96

Closed
MaxGhenis opened this issue Aug 31, 2024 · 1 comment

Comments

@MaxGhenis
Copy link
Contributor

https://policyengine-us-marriage-incentive.streamlit.app/

────────────────────── Traceback (most recent call last) ───────────────────────

  /home/adminuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrun  

  ner/exec_code.py:88 in exec_func_with_error_handling                          

                                                                                

  /home/adminuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrun  

  ner/script_runner.py:590 in code_to_exec                                      

                                                                                

  /mount/src/us-marriage-incentive/app.py:3 in <module>                         

                                                                                

     1 import streamlit as st                                                   

     2 import pandas as pd                                                      

  ❱  3 from policyengine_us.variables.household.demographic.geographic.state_c  

     4 import table                                                             

     5 import heatmap                                                           

     6                                                                          

                                                                                

  /home/adminuser/venv/lib/python3.9/site-packages/policyengine_us/__init__.py  

  :10 in <module>                                                               

                                                                                

     7                                                                          

     8 See https://openfisca.org/doc/key-concepts/tax_and_benefit_system.html   

     9 """                                                                      

  ❱ 10 from policyengine_us.system import (                                     

    11 │   CountryTaxBenefitSystem,                                             

    12 │   Simulation,                                                          

    13 │   Microsimulation,                                                     

                                                                                

  /home/adminuser/venv/lib/python3.9/site-packages/policyengine_us/system.py:1  

  2 in <module>                                                                 

                                                                                

     9 │   Microsimulation as CoreMicrosimulation,                              

    10 │   IndividualSim as CoreIndividualSim,                                  

    11 )                                                                        

  ❱ 12 from policyengine_us.data import CPS                                     

    13 from policyengine_us.tools.taxcalc.generate_taxcalc_variable import (    

    14 │   add_taxcalc_variable_aliases,                                        

    15 )                                                                        

                                                                                

  /home/adminuser/venv/lib/python3.9/site-packages/policyengine_us/data/__init  

  __.py:1 in <module>                                                           

                                                                                

  ❱ 1 from policyengine_us.data.datasets import CPS, RawCPS, ACS, RawACS        

    2                                                                           

                                                                                

  /home/adminuser/venv/lib/python3.9/site-packages/policyengine_us/data/datase  

  ts/__init__.py:1 in <module>                                                  

                                                                                

  ❱ 1 from .cps import CPS, RawCPS                                              

    2 from .acs import ACS, RawACS                                              

    3                                                                           

    4 DATASETS = [CPS, RawCPS, ACS, RawACS]                                     

                                                                                

  /home/adminuser/venv/lib/python3.9/site-packages/policyengine_us/data/datase  

  ts/cps/__init__.py:1 in <module>                                              

                                                                                

  ❱ 1 from policyengine_us.data.datasets.cps.cps import CPS                     

    2 from policyengine_us.data.datasets.cps.raw_cps import RawCPS              

    3                                                                           

                                                                                

  /home/adminuser/venv/lib/python3.9/site-packages/policyengine_us/data/datase  

  ts/cps/cps.py:2 in <module>                                                   

                                                                                

      1 import logging                                                          

  ❱   2 from policyengine_core.data import PublicDataset                        

      3 import h5py                                                             

      4 from policyengine_us.data.datasets.cps.raw_cps import RawCPS            

      5 from policyengine_us.data.storage import policyengine_us_MICRODATA_FOL  

────────────────────────────────────────────────────────────────────────────────

ImportError: cannot import name 'PublicDataset' from 'policyengine_core.data' 

(/home/adminuser/venv/lib/python3.9/site-packages/policyengine_core/data/__init_

_.py)
@MaxGhenis MaxGhenis changed the title Error running ImportError: cannot import name 'PublicDataset' from 'policyengine_core.data' Aug 31, 2024
@MaxGhenis
Copy link
Contributor Author

This was due to Python 3.9. I deleted and redeployed on Python 3.11, which fixed this, but caused #98.

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

1 participant