Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ImportError: cannot import name _server

See original GitHub issue

Describe the bug

When running rqd or other modules that use rqutil a import error will occur.

2019-08-19 16:12:38,016 WARNING   rqd3-rqd        RQD Starting Up
2019-08-19 16:12:38,019 WARNING   rqd3-rqcore     Nimby startup has been disabled via OVERRIDE_NIMBY
Traceback (most recent call last):
  File "rqd/0.2.65/bin/rqd", line 166, in <module>
  File "rqd/0.2.65/bin/rqd", line 162, in main
  File "rqd/0.2.65/python/rqd/", line 582, in start
  File "rqd/0.2.65/python/rqd/", line 201, in start_grpc
  File "rqd/0.2.65/python/rqd/", line 162, in __init__
  File "grpcio/1.22.0/platform-linux/arch-x86_64/python-2.7/python/grpc/", line 1843, in server
ImportError: cannot import name _server

To Reproduce

I’ve seen this behaviour is both our rez install and in a virtualenv install.

Expected behavior

If comment out rqutil.permissionsLow() from rqd.__main__ it works correctly.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

donalmcommented, Aug 24, 2019

I think Lars has identified the problem. When rqd starts up it prints a warning:

WARNING: This executable will drop privileges and run as the 'daemon' user.
         If your development environment cannot be accessed by the 'daemon'
         user, you may get unexpected ImportErrors

I guess it’s just a permission error, so for example even this should fail:

sudo -u daemon cat grpcio/1.22.0/platform-linux/arch-x86_64/python-2.7/python/grpc/

Not related to the proto compiler version or anything too esoteric I think.

simonlvrcommented, Jan 20, 2021

I managed to run the sudo -u daemon cat from the site-packages folder on but I’m still getting the same error message unfortunately.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ImportError: cannot import name server · Issue #1308 - GitHub
I have installed tensor flow using pip command and then cloned the git repository for examples. Inside the git cloned repo on master...
Read more >
How to Fix ImportError: Cannot Import Name in Python - Rollbar
The Python ImportError: cannot import name error occurs when an imported class is not accessible or is in a circular dependency.
Read more >
python aiorpc: "ImportError: cannot import name 'RPCServer ...
I'm looking for a python rpc lib ...
Read more >
ImportError: cannot import name 'shape' - PennyLane Help
I'm trying to import Pennylane for the first time and I keep getting this error for 'import pennylane as qml': ImportError Traceback (most ......
Read more >
importerror: cannot import name simplexmlrpcserver ( Lets fix )
See, SimpleXMLRPCServer module is now merged in xmlrpc.server standard module of python 3. But if you are using python 2, you would be...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found