Skip to content

ModuleNotFoundError: No module named 'flask_pymongo._version' with new Pymongo Version #186

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

Closed
winstonc03 opened this issue Jan 29, 2025 · 1 comment · Fixed by #187
Closed

Comments

@winstonc03
Copy link

winstonc03 commented Jan 29, 2025

File "/app/config.py", line 77, in
import flask_pymongo
File "/usr/local/lib/python3.10/site-packages/flask_pymongo/init.py", line 41, in
from flask_pymongo._version import version
ModuleNotFoundError: No module named 'flask_pymongo._version'

I'm seeing a module not found error, I've been using this package inside a docker container for a while and haven't had any issues. My other packages are installed correctly.

I've reverted the package version to 2.3.0 and my image builds correctly

I've included the dockerfile below.

# Use an official Python runtime as a base image
FROM python:3.10-slim

WORKDIR /app

COPY . /app

# Install any necessary dependencies specified in requirements.txt
RUN pip install --no-cache-dir -r requirements.txt

# Make port 5000 available to the world outside this container
EXPOSE 3031

CMD ["python", "main.py"]

Here is my requirements.txt file

flask
flask_cors
flask_restful
requests
flask_pymongo
slack_sdk
@blink1073
Copy link
Member

Thanks for the report @winstonc03, we are releasing a fix in 3.0.1.

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 a pull request may close this issue.

2 participants