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

Error when reading in single station #405

Open
amberJ99 opened this issue Dec 14, 2023 · 3 comments
Open

Error when reading in single station #405

amberJ99 opened this issue Dec 14, 2023 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@amberJ99
Copy link
Collaborator

Bij het inlezen van data en metadata van een single station, komt de volgende error:
SystemExit: Fatal: The given template: ['temp', 'name', 'lat', 'lon'] does not match with any of the metadata columns: ['Station', 'Latitude', 'Longitude'].

Gebruikte files:
[BAS_2016and2020_standard_1H.csv
template.csv
](https://github.com/vergauwenthomas/MetObs_toolkit/files/13675704/BAS_2016and2020_standard_1H.csv)
BAS_coordinates_original.csv

Code:

 #%% READ IN STATION WITH METADATA
    
    #1. Define the paths to your files: 

    data_file = r"C:\Users\ambjacob\Documents\Python_projecten\Paper_GF\Data_made\MOCCA\BAS_2016and2020_standard_1H.csv"
    meta_data_file = r"C:\Users\ambjacob\Documents\Python_projecten\Paper_GF\Data_made\MOCCA\BAS_coordinates.csv"
    template = r"C:\Users\ambjacob\Documents\Python_projecten\Paper_GF\Data_made\MOCCA\template.csv"

    #2. initiate a dataset: 

    your_dataset = metobs_toolkit.Dataset()

    #3. Update the paths to your files: 

    your_dataset.update_settings(
        input_data_file = data_file,
        input_metadata_file = meta_data_file,
        template_file = template,
        )

    #4. Import your data : 

    your_dataset.import_data_from_file()
@amberJ99 amberJ99 added the bug Something isn't working label Dec 14, 2023
@amberJ99
Copy link
Collaborator Author

The same error occurs when reading in a dataframe in wide format.

@vergauwenthomas
Copy link
Owner

@amberJ99 Tomorrow i have some time to take a look at these.
Can you specify which version you are working on ?

print(metobs_toolkit.__version__)

@amberJ99
Copy link
Collaborator Author

I'm working with version 0.1.2.
Let me know if you need more explanation on the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants