[GH-ISSUE #1376] Cron & python error #1093

Closed
opened 2026-02-27 11:15:13 +03:00 by kerem · 6 comments
Owner

Originally created by @CooperBarrett on GitHub (Jan 29, 2018).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/1376

Impacted versions

  • Modoboa: 1.9.1
  • installer used: Yes
  • Webserver: Nginx

Steps to reproduce

Cron


Hello,
I receive a cron error by email:

Subject:
Cron <root@monserve> $PYTHON $INSTANCE/manage. py communicate_with_public_api

Content:
CommandError: Failed to update instance.

If I try to run the command manage. py manually, here is the returned error:

Traceback (most recent call last):
  File "/srv/modoboa/instance/manage. py", line 17, in <module>
    "Couldn't import Django. Are you sure it's installed and "
ImportError: Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable? Did you forget to activate a virtual environment?

Django seems to be well installed but I don't know how to check if it is activated or not.

Thank you in advance for your help. I used a translator, I hope the translation is clear!

Originally created by @CooperBarrett on GitHub (Jan 29, 2018). Original GitHub issue: https://github.com/modoboa/modoboa/issues/1376 # Impacted versions * Modoboa: 1.9.1 * installer used: Yes * Webserver: Nginx # Steps to reproduce Cron --- Hello, I receive a cron error by email: **Subject:** `Cron <root@monserve> $PYTHON $INSTANCE/manage. py communicate_with_public_api` **Content:** `CommandError: Failed to update instance.` If I try to run the command `manage. py` manually, here is the returned error: ``` Traceback (most recent call last): File "/srv/modoboa/instance/manage. py", line 17, in <module> "Couldn't import Django. Are you sure it's installed and " ImportError: Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable? Did you forget to activate a virtual environment? ``` Django seems to be well installed but I don't know how to check if it is activated or not. Thank you in advance for your help. I used a translator, I hope the translation is clear!
kerem closed this issue 2026-02-27 11:15:13 +03:00
Author
Owner

@tonioo commented on GitHub (Jan 29, 2018):

@CooperBarrett could it be related too https://github.com/modoboa/modoboa/issues/1345?

<!-- gh-comment-id:361227234 --> @tonioo commented on GitHub (Jan 29, 2018): @CooperBarrett could it be related too https://github.com/modoboa/modoboa/issues/1345?
Author
Owner

@CooperBarrett commented on GitHub (Jan 29, 2018):

yes it looks like it except that it's for communicate_with_public_api.

If I do
/srv/modoboa/env/env/bin/python/python /srv/modoboa/instance/manage. py communicate_with_public_api
I have no error.

However, I didn't really understand how to solve the problem.
The variables PYTHON and INSTANCE are well informed.

<!-- gh-comment-id:361235456 --> @CooperBarrett commented on GitHub (Jan 29, 2018): yes it looks like it except that it's for `communicate_with_public_api`. If I do ```/srv/modoboa/env/env/bin/python/python /srv/modoboa/instance/manage. py communicate_with_public_api``` I have no error. However, I didn't really understand how to solve the problem. The variables PYTHON and INSTANCE are well informed.
Author
Owner

@danielsatanik commented on GitHub (Jan 29, 2018):

Same problem here and this is probably already the 3rd or 4th time it happened, last time @tonioo you said it was a SSL issue, is this regularly reappearing?
For a little more info last time it kind of happened every full hour now it is like every few hours.
Here is the issue I posted before #1343

<!-- gh-comment-id:361239201 --> @danielsatanik commented on GitHub (Jan 29, 2018): Same problem here and this is probably already the 3rd or 4th time it happened, last time @tonioo you said it was a SSL issue, is this regularly reappearing? For a little more info last time it kind of happened every full hour now it is like every few hours. Here is the issue I posted before #1343
Author
Owner

@tonioo commented on GitHub (Feb 1, 2018):

@danielsatanik It is not the same issue. I made some changes to the public API today, let's see if it solves something.

<!-- gh-comment-id:362314605 --> @tonioo commented on GitHub (Feb 1, 2018): @danielsatanik It is not the same issue. I made some changes to the public API today, let's see if it solves something.
Author
Owner

@danielsatanik commented on GitHub (Feb 1, 2018):

@tonioo I haven't received the error in hours, so I guess it is fine again. I also believe you that it was a different bug but it caused the same error to be sent via email, just not as regularly.

<!-- gh-comment-id:362337457 --> @danielsatanik commented on GitHub (Feb 1, 2018): @tonioo I haven't received the error in hours, so I guess it is fine again. I also believe you that it was a different bug but it caused the same error to be sent via email, just not as regularly.
Author
Owner

@CooperBarrett commented on GitHub (Feb 8, 2018):

I close this ticket, I don't have the error since my update to modoboa 1.10

<!-- gh-comment-id:364090501 --> @CooperBarrett commented on GitHub (Feb 8, 2018): I close this ticket, I don't have the error since my update to modoboa 1.10
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/modoboa-modoboa#1093
No description provided.