import gspread
rest of the code.
error :
Traceback (most recent call last):
File "C:\QSTK\Examples\MyCodes\gspread.py", line 1, in
import gspread
when i try to run the code in spyder i get this error.
the code works fine in python idle
Rename your script. You named it the same as a module you are trying to use, gspread, this causes a circular dependency.
Related
I have my own project with virtual environment. When I am trying to debug code everything executes flawlessly and I get the expected output, but when I am trying to run it with run code option from Code Runner extension I receive the error:
[Running] python -u "c:\Users\slikm\Pulpit\ytapi\yt_api.py" Traceback (most recent call last): File "c:\Users\slikm\Pulpit\ytapi\yt_api.py", line 2, in <module> from googleapiclient.discovery import build ModuleNotFoundError: No module named 'googleapiclient'
I have the library which the module is taken from installed on my venv. I read that the problem might be with the interpreter the extension uses, but I don't really know how to figure it out.
I have a startup code to use gingerit on python. Gingerit is by far the most enhanced and the best grammar tool available on python. When I try running the code I have, I started receiving a traceback error.I am currently using 3.7 and the code I used is present on the official gingerit documentation.
text = 'it is there problem'
parser = GingerIt()
parser.parse(text)
I expected to not have any errors on this but there was a traceback error.
Traceback (most recent call last):
File "C:/Users/sid071/Desktop/gingerit.py", line 1, in <module>
from gingerit.gingerit import GingerIt
File "C:/Users/sid071/Desktop\gingerit.py", line 1, in <module>
from gingerit.gingerit import GingerIt
ModuleNotFoundError: No module named 'gingerit.gingerit'; 'gingerit' is not a package
Your script is called gingerit, which is hiding the package you installed. Rename your script to something else.
I have a python script which runs another python script and this latter script imports a module. It fails to do so and returns the following:
Traceback (most recent call last):
File "/some/path/script.py", line 13, in
import Autodock as AD
File "/some/path/to/module/Autodock.py", line 30, in
import BALL
File "/usr/lib/pymodules/python2.7/BALL.py", line 1, in
from BALLCore import *
ImportError: /usr/lib/pymodules/python2.7/BALLCore.so: undefined symbol: _ZN4BALL25FragmentDistanceCollectorclERNS_9CompositeE
However it gets loaded successfully when I just open the python interpreter and enter this:
>>> from BALLCore import *
Other scripts which also run /some/path/to/module/Autodock.py (which is the script importing the module) run successfully. What makes them successfully import the module from the same module-path?
I need to excuse myself for not sharing so much code, because I have no clue where to look. Any guidance would be appreciated.
I downloaded this library: https://github.com/bufferapp/buffer-python
Ran the setup.py install, and then tried to run some code using the newly installed library.
What happens though is I get this error:
Traceback (most recent call last):
File "twitter-quote-bot.py", line 14, in <module>
from buffpy.managers.profiles import Profiles
ImportError: No module named managers.profiles
The only way I've found to fix it is to move my program (twitter-quote-bot) into the downloaded folder from Buffer and run it there.
Did I do something wrong in the installation? It seems like I should be able to do these imports globally.
Thanks in advance!
I've decided to give Python a try on Netbeans. The problem so far is when try to run program I know works, i.e. if I ran it through the terminal. For the project I selected the correct Python version (2.6.5). And received the following error:
Traceback (most recent call last): File
"/Users/XXX/NetBeansProjects/NewPythonProject3/src/newpythonproject3.py",
line 4, in
import sqlite3 ImportError: No module named sqlite3
Search for PYTHONPATH. You probably have different settings in your OS and Netbeans.