This communication is confidential and subject to and governed by Saama’s Electronic Communications Disclaimer.
When I try to connect to mongo shell from pycharm I get the following error
Hi Anil,
Could you clarify the above:
mongod using mongo shell embedded in PyCharm ? Or connecting from PyCharm to a mongo shell to re-direct database operations ? mongod log file ? The format looks like so, but could you clarify ?Try checking the permission of the file /Users/anilthorat/.mongorc.js, to confirm whether you have access to it.
In addition to the above check, you should confirm whether you’re running as the correct user and permission. mongo shell checks the existence of mongorc.js file in the user’s HOME directory on start up. Assuming that PyCharm MongoDB shell is calling mongo , then it’s most likely that the process is invoked as user anilthorat.
See also more information about mongorc.js file.
Regards,
Wan.
cannot run programs using pycharm, the same program if I run from terminal it works fine.
Hi Anil,
The problem here is the environment that PyCharm is executing your code differs to how you execute your code. Most likely PyCharm spawns a new environment where pymongo (or other third-party modules) is not available.
You may find this useful PyCharm: Run/Debug Configuration - Python
As this question related more about PyCharm configuration than MongoDB itself, you may want to post a question in StackOverflow to reach wider audience.
Regards,
Wan.