TypeError:First argument must be file descriptor
来源:互联网 发布:新浪nba科比数据 编辑:程序博客网 时间:2024/05/01 01:32
1、错误描述
2、错误原因
var app = require('fs');var buf = new Buffer('我爱你,编程!');app.open('you.txt','wx',function(err,fd){app.write(fd,buf,0,15,0,function(err,written,buffer){if(err)console.log("写入文件失败");elseconsole.log("写入文件成功");app.close(fd);});});第一个参数必须是文件描述符
3、解决办法
1 0
- TypeError:First argument must be file descriptor
- NodeJs TypeError: First argument must be file descriptor解决方法
- TypeError: unbound method a() must be called with A instance as first argument (got nothing instead)
- TypeError: unbound method func1() must be called with base1 instance as first argument (got nothing
- 学习node时报错throw new TypeError('first argument must be a string or Buffer');
- TypeError: unbound method x must be called with x instance as first argument (got nothing instead)
- Python出现TypeError: file() argument 1 must be encoded string without NULL bytes, not str问题解决
- TypeError: write() argument must be str, not bytes
- python-TypeError: write() argument must be str, not numpy.float64
- docx2txt TypeError: write() argument must be str, not bytes
- TypeError: argument 1 must be string or buffer, not instance
- python-rrdtool创建rrd文件的TypeError: argument 0 must be string 错误
- super() fails with error: TypeError “argument 1 must be type, not classobj”
- python3-网络编程-TypeError: send() argument 1 must be bytes or buffer, not str异常
- TypeError: unbound method must be called with class instance 1st argument
- Python 读写文件 中文乱码 错误TypeError: write() argument must be str, not bytes+
- python提示错误TypeError: write() argument must be str, not bytes
- Python 读写文件 错误TypeError: write() argument must be str, not bytes+
- shp文件保存到mysql
- shell从路径从取出文件名字
- 2016 PSUT Coding Marathon(gym100989)
- 【BZOJ】2301 Problem b
- pool(五)——BasicDataSource
- TypeError:First argument must be file descriptor
- 计算日期前一天,后一天
- javaweb 1
- Hibernate总结(五)--之多对多操作
- android中存储的一些步骤
- 关于kubernetes 的 cluster IP , node IP ,container IP , 和 VIP
- javaweb 2
- ACM知识点 之 贪心(5)最小区间覆盖问题
- Java基础之类型转换