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

Global industry dataset #221

Closed
wants to merge 33 commits into from
Closed

Global industry dataset #221

wants to merge 33 commits into from

Conversation

Eddy-JV
Copy link
Collaborator

@Eddy-JV Eddy-JV commented Aug 17, 2023

Closes #184 (if applicable).

Changes proposed in this Pull Request

  • Fetch global industry dataset for:

    - Coal
    - Ferrous  metals
    - Cement
    - Steel
    - Oil refineries
    
  • Adapt the script for input to the model.

  • Integrate it to the model using snakemake and add in config file.

  • Ready for merge.

Checklist

  • I tested my contribution locally and it seems to work fine.
  • Code and workflow changes are sufficiently documented.
  • Newly introduced dependencies are added to envs/environment.yaml and envs/environment.docs.yaml.
  • Changes in configuration options are added in all of config.default.yaml, config.tutorial.yaml, and test/config.test1.yaml.
  • Changes in configuration options are also documented in doc/configtables/*.csv and line references are adjusted in doc/configuration.rst and doc/tutorial.rst.
  • A note for the release notes doc/release_notes.rst is amended in the format of previous release notes, including reference to the requested PR.

@hazemakhalek hazemakhalek marked this pull request as ready for review August 24, 2023 10:21
Copy link
Collaborator

@energyLS energyLS left a comment

Choose a reason for hiding this comment

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

Looks good. Got some issue with the data fetching:
grafik
Is the issue familiar?

@hazemakhalek
Copy link
Collaborator

@Eddy-JV Do you have suggestions here?

@Eddy-JV
Copy link
Collaborator Author

Eddy-JV commented Aug 30, 2023

It happened to me also some few times. But if I am not mistaken, it was solved by just running the script again. I guess I had some network issues.

@hazemakhalek is it running in your environment?

In general: The ssl.SSLError with the message "[SSL: CERTIFICATE_VERIFY_FAILED]" indicates that there's a problem with verifying the SSL certificate of the server you're trying to connect to. This can happen if the server's SSL certificate is not recognized as valid by your Python environment.

Here are a few steps you can take to troubleshoot and resolve this issue:

  1. Update Your CA Certificates: Make sure your system's CA (Certificate Authority) certificates are up-to-date. This can be done by updating your operating system's package manager or by manually updating the CA certificates.

  2. Check System Time and Date: Incorrect system time and date settings can lead to SSL verification errors. Ensure that your system's time and date settings are correct.

  3. Verify the Server's SSL Certificate: Manually check if the SSL certificate of the server you're trying to connect to is valid. You can do this using a web browser or command-line tools like OpenSSL.

  4. Add SSL Certificates to Python: If the server is using a self-signed certificate or a custom certificate authority, you might need to add the server's certificate to Python's certificate store. You can do this by using the certifi library:

pip install certifi

Then, in your code, set the SSL certificate file using:

import certifi
import ssl

ssl_context = ssl.create_default_context(cafile=certifi.where())

Pass ssl_context to your requests or other networking libraries.

  1. Disable SSL Verification (Not Recommended): While it's not recommended for security reasons, you can disable SSL verification temporarily for testing purposes by passing verify=False to your request. However, this approach should not be used in production.
import requests

response = requests.get(url, verify=False)
  1. Check Proxy Settings: If you're behind a corporate firewall or using a proxy, it could be intercepting SSL traffic. Ensure your proxy settings are correctly configured.

  2. Check Antivirus/Firewall: Some antivirus or firewall software might interfere with SSL connections. Temporarily disabling such software (if safe) can help identify if it's the cause.

  3. Network Issues: In some cases, network issues might cause SSL verification problems. Ensure you have a stable internet connection.

Remember that disabling SSL verification or not verifying the server's certificate can expose your communications to potential security risks. It's always best to resolve the underlying SSL issue rather than bypassing the verification.

@energyLS
Copy link
Collaborator

@hazemakhalek please retrigger CI and see if error persists
@energyLS can review

@hazemakhalek hazemakhalek deleted the Additions_industry branch January 31, 2024 14:03
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

Successfully merging this pull request may close these issues.

Include a default global insudstry database
3 participants