Skip to content

ModuleNotFoundError: No module named 'grp' #6797

Description

@voegtlel

Checklist

  • I have verified that the issue exists against the master branch of Celery.
  • This has already been asked to the discussion group first.
  • I have read the relevant section in the
    contribution guide
    on reporting bugs.
  • I have checked the issues list
    for similar or identical bug reports.
  • I have checked the pull requests list
    for existing proposed fixes.
  • I have checked the commit log
    to find out if the bug was already fixed in the master branch.
  • I have included all related issues and possible duplicate issues
    in this issue (If there are none, check this box anyway).

Hey there! I've read all the checkboxes etc. but it's such an obvious bug, that I feel they are not necessary. I hope that this unconformity won't let you just ignore the actual issue:

Steps to Reproduce

Minimally Reproducible Test Case

Run celery on Windows, no matter which python.

Expected Behavior

It should start

Actual Behavior

  File ".venv\lib\site-packages\celery\platforms.py", line 9, in <module>
    import grp
ModuleNotFoundError: No module named 'grp'

The module grp is only available on linux, thus this does not work on widnwos and also not make sense as a global import. It's also imported below by try_import.

Possible fix

This line should simply be removed, because below there is a try_import for this as well. Also in the check_privileges, the non-existence of grp should be checked. Unfortunately due to my companies restrictions I cannot submit a MR.

Git blame shows @namloc2001 and @thedrow for this line which is still on master.

Thanks!

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions