Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/304.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/asp.net-mvc/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在pythonx,y中使用gspread python库 代码的其余部分。_Python_Pythonxy - Fatal编程技术网

在pythonx,y中使用gspread python库 代码的其余部分。

在pythonx,y中使用gspread python库 代码的其余部分。,python,pythonxy,Python,Pythonxy,错误: 回溯(最近一次呼叫最后一次): 文件“C:\QSTK\Examples\MyCodes\gspread.py”,第1行,在 导入gspread 当我试图在spyder中运行代码时,我得到了这个错误 代码在python idle中运行良好重命名脚本。您将其命名为与尝试使用的模块相同的模块,gspread,这会导致循环依赖关系。例如,将文件gspread.py中的脚本重命名为example.py import gspread

错误:

回溯(最近一次呼叫最后一次): 文件“C:\QSTK\Examples\MyCodes\gspread.py”,第1行,在 导入gspread

当我试图在spyder中运行代码时,我得到了这个错误


代码在python idle中运行良好

重命名脚本。您将其命名为与尝试使用的模块相同的模块,
gspread
,这会导致循环依赖关系。

例如,将文件
gspread.py
中的脚本重命名为
example.py
import gspread