腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
圈层
工具
文章/答案/技术大牛
搜索
搜索
关闭
发布
精选内容/技术社群/优惠产品,
尽在小程序
立即前往
文章
问答
(3903)
视频
沙龙
1
回答
如何
修复
Python
3.7中
的
"
integer
argument
expected
,
got
“
错误
、
当我在
Python
3.7中运行生成图片和更改像素
的
代码时,我得到了一个
错误
。 不过,我并没有尝试太多
的
选择。我使用
的
是Windows 10和
Python
3.7.3。for y in range(480): img.show() 我希望输出
的
是一个带有橙色和蓝色阴影
的
图像
浏览 28
提问于2019-04-19
得票数 0
回答已采纳
1
回答
使用字符串
的
for循环有什么问题?
、
、
我在学校
的
时候就在做这方面的工作,似乎不能用字符串来使用for循环。
浏览 3
提问于2013-09-02
得票数 0
回答已采纳
1
回答
Nose/Unittest依赖于
Python
版本
的
不同测试
、
我正在为我正在编写
的
pandas
的
一个应用程序接口添加编写。他们使用Travis CI来运行他们
的
测试套件。在我使用
的
Python
版本(
Python
2.7.6,numpy 1.9.2)中,下面的代码引发了一个TypeErrorTypeError:
integer
argument
expected
,
got
float 但在T
浏览 2
提问于2015-08-17
得票数 1
4
回答
TypeError:输入应最多有1个参数,但已有2个
这是我
的
代码,我一直收到
错误
我该
如何
修复
?
浏览 0
提问于2021-03-20
得票数 2
11
回答
如何
忽略
Python
中
的
弃用警告
、
、
我一直收到这样
的
信息:怎样才能让这条消息消失呢?在
Python
中有没有避免警告
的
方法?
浏览 744
提问于2009-05-18
得票数 219
回答已采纳
1
回答
TypeError: range()所期望
的
整数结束参数,
got
int
、
、
、
、
我使用Squish6.4.2测试我
的
Qt应用程序,使用
Python
2.7.10作为测试脚本语言,并在尝试使用range()函数时得到以下
错误
消息:Error: Script Error Detail: TypeError: range()
integer
end
argument
浏览 1
提问于2019-03-27
得票数 1
回答已采纳
1
回答
日期时间和相对人
的
奇怪算术
、
、
、
我看到了一些奇怪
的
、不一致
的
行为,无法找到这个类支持哪种算术
的
文档(如果有的话)。datetime.datetime(2014, 5, 30, 12, 24, 59, 173941)# TypeError:
integer
argument
expected
,
got
float>>> relativedelta(days=2)
浏览 2
提问于2014-05-28
得票数 1
回答已采纳
1
回答
类型:不兼容
的
返回值类型
、
、
、
、
object for each record in data name: str space: float但是,当我使用mypy检查代码时,我会得到以下
错误
Found
浏览 4
提问于2022-07-31
得票数 2
回答已采纳
6
回答
创建斐波那契序列生成器(初学者
Python
)
嗨,我正在尝试用
Python
创建一个斐波那契序列生成器。这是我
的
代码:b = 1 print b c = a + b a = b当我运行这个程序时,我得到了
错误
: File "Fibonacci SequenceGen.py", line 10, in
浏览 0
提问于2012-01-22
得票数 4
1
回答
Python
:TypeError()应为整型结束参数,但已获得浮点型
、
我提前道歉,我已经看到了类似
错误
的
答案,但我不能从中找出任何关于我
的
案例
的
答案。我
的
python
非常基础,我正在尝试运行这小段代码:# this 'box' is my input sothese values will vary 运行它时,我得
浏览 0
提问于2013-04-19
得票数 0
回答已采纳
2
回答
禁用numpy中
的
静默转换
、
是否有一种方法可以禁用numpy中
的
无声转换?but I would prefer a TypeError当分配任何非ndarray类型
的
值时如果不是,最好
的
选择是子类numpy.ndarray (并覆盖__setattr__或__setitem__)吗?
浏览 7
提问于2014-08-24
得票数 4
回答已采纳
3
回答
如何
修复
*args和**kwargs
的
'
got
values for
argument
‘
错误
?
、
、
请考虑以下几点: return my_function(*args, **kwargsarg2, params=None): return resultmy_wrapper('foo', 'bar', wrapper_
argument
=True)TypeError: my_function()
got
m
浏览 1
提问于2015-02-05
得票数 4
3
回答
确保函数输入参数为int/str
的
Pythonic方法?
、
基本上,foo()期望
的
论点应该以int
的
形式传递,但也有可能有人将其传递为str (如果str可以转换为int,这也是有效
的
)。这就是我想出来
的
: func_name = 'foo' print(
浏览 0
提问于2019-08-30
得票数 2
1
回答
验证函数中
的
返回语句
、
、
、
、
我在浏览https://github.com/
python
/cpython/blob/master/Lib/datetime.py,偶然发现了一些类型检查函数(我简化了它们,最初是_check_int_field(value, int): raise TypeError('
integer
argument
expected
,
got
%s' % type(value)) 我
的</em
浏览 19
提问于2019-10-12
得票数 0
回答已采纳
1
回答
我一直得到
错误
: TypeError:
integer
参数,在
Python
3.6.5中得到浮动
、
我使用
的
是从
Python
.org下载
的
Python
3.6.5版本。在编程时,我一直得到
错误
的
TypeError:
integer
argument
expected
,
got
float。displayWidth/40, displayHeight/8之前,我没有收到任何
错误
,所以我猜想这与此有关。以下是完整
的
错误
: Traceback (mo
浏览 2
提问于2018-08-28
得票数 1
回答已采纳
1
回答
从生成管道运行
python
测试时出错- TypeError:__init__()获得意外
的
关键字参数'client_options‘
、
、
、
、
在运行
python
测试时,我在代码中使用了google-cloud-datastore,那么这个
错误
是不是特定于版本?TypeError: __init__()
got
an unexpected keyword
argument
'client_options'
如何
修复
此
错误
?
浏览 15
提问于2020-08-20
得票数 1
回答已采纳
3
回答
将多维数组传递给C++中
的
函数
、
、
、
我编写这个函数是为了交换多维数组中
的
值,因为我认为数组是指针。= *a; *b = tmp;但是,当我尝试使用该函数时我从编译器得到这些
错误
pointer from
integer
without a cast [-werror] fifteen.c:45:6: note:
expected
'int *' but
argument
isof type '
浏览 2
提问于2012-10-28
得票数 1
回答已采纳
3
回答
在
python
中为for循环使用整数参数
对于
python
,我尝试使用一个整数作为for循环
的
参数。(0,"%d" % postsint):给了我一个
错误
,- File "forarg.py", line 6, in <module>Type
浏览 0
提问于2012-09-06
得票数 2
回答已采纳
3
回答
如何
在两只熊猫栏中使用圆圈
、
我试图将熊猫数据栏中
的
值舍入到另一列中指定
的
小数位,如下面的代码所示。3, 2, 2] df['price'] = df.apply(lambda x: round(x.price, x.decimal), axis=1)> df['price'] = df.apply(lambda x: round(x.price, x.decimal), axis=1) E TypeError: ('
integer
<
浏览 2
提问于2020-01-24
得票数 3
回答已采纳
1
回答
TypeError:要求range()整数结束参数,在
Python
中获取字符串
、
我是个新手,正在尝试
python
。我用
python
写了一个程序,当我执行
的
时候,我得到了
错误
。有谁能帮帮我吗?break; print x, " is not a prime number" File "today1.py", line 7, in <module>T
浏览 1
提问于2014-02-07
得票数 2
点击加载更多
扫码
添加站长 进交流群
领取专属
10元无门槛券
手把手带您无忧上云
热门
标签
更多标签
云服务器
ICP备案
云直播
对象存储
实时音视频
活动推荐
运营活动
广告
关闭
领券