skip to Main Content

I have the problem that after I installed tha package "pandas-market-calendars" when I have my py to import this package, it shows that did find the module.

Here are my ymal codes:

name: Daily Python Script

on:
  schedule:
    - cron: '15 20 * * *'
  workflow_dispatch:

jobs:
  run-script:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Set up Python
        uses: actions/setup-python@v2
        with:
          python-version: '3.9'
      
      
      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          pip install pandas
          pip install numpy
          pip install yfinance
          pip install pandas_market_calendars
          pip install datetime
          pip install pytz
      
      
      - name: Run script
        run: |
          python update_raw_data.py && python prepro.py
      
      - name: Commit changes ... removed by me

I have run this GitHub script for a month and there is no problem with it. But today it have this error today.

Error message is followed.

Run python update_raw_data.py && python prepro.py
Traceback (most recent call last):
  File "/home/runner/work/stock_prediction/stock_prediction/update_raw_data.py", line 7, in <module>
    import pandas_market_calendars as mcal
ModuleNotFoundError: No module named 'pandas_market_calendars'
Error: Process completed with exit code 1.

How can I fix it?

2

Answers


  1. Chosen as BEST ANSWER

    Problem fixed. The reason is becuase pandas_market_calendars does not work properly in v4.2, I downgraded to v4.1.4 and it works fine for now.

    Need to wait the new version update.


  2. It looks like the authors made a packaging error when publishing version 4.2 of the package. This was subsequently fixed and released in 4.2.1 which was released 3 hours ago at the time of writing this answer.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search