python OSError: [Errno 22] Invalid argument: 'D:\\crawle\x01.html1'
import urllib.request
file = urllib.request.open("http://www.baidu.com")
data = file.read()
print(data)
fhandle = open("D:\crawle\html1","wb")
fhandle.write(data)
fhandle.close()

然而在这时我运行时出错了
只需如下添加即可

python OSError: [Errno 22] Invalid argument: 'D:\\crawle\x01.html1'的更多相关文章
- python OSError: [Errno 22] Invalid argument: '\u202aF://text
		windows10 python3 读文件的时候报的错误 原因不明时好时坏很头疼但又没办法不知道怎么解决,网上的说法都不能解决, 
- 在使用python语言的open函数时,提示错误OSError: [Errno 22] Invalid argument: ‘文件路径’
		如题,在使用python语言的open函数时,提示错误OSError: [Errno 22] Invalid argument: '文件路径',在查阅了大量资料后也得到了一些解决方案,但是这些解决方案 ... 
- python使用open的OSError: [Errno 22] Invalid argument错误
		这两天在写一个新闻类的spider时,遇到了OSError: [Errno 22] Invalid argument这个错误,苦恼的两天,无果.后来通过请教学长,发现原来是打开的文件名中含有一些系统的 ... 
- 【Selenium】【BugList9】windows环境,fp = open("./"+ time.strftime("%Y-%m-%d %H:%M:%S") + " result.html",'wb'),报错:OSError: [Errno 22] Invalid argument: './2018-09-05 10:29:32 result.html'
		[代码] if __name__=="__main__": suite = unittest.TestSuite() suite.addTest(Baidu("test_ ... 
- 【Selenium + Python】路径报错之OSError: [Errno 22] Invalid argument: './t/report/2018-03-23_11:03:12_report.html'
		现象: 此问题真的是太痛苦了,查了好多资料是说路径的问题,结果还是报错,后来一点点的排查才发现原来是!!!!!! 废话不多说上原来代码: if __name__ == '__main__': star ... 
- tensorboard  OSError:[Errno 22] Invalid argument
		哈哈 问题解决了.感谢大佬 Bill.Z 附上原文链接:https://blog.csdn.net/u013244846/article/details/88380860 解决方法:更改manager ... 
- OSError: [Errno 22] Invalid argument: 'D:\x07ckup\test.txt'
		使用with open("D:\backup\test.txt","rt") as f:报上面的错误,将上面的语句改成 with open(r"D:\ ... 
- Python创建文件报错OSError:[Errno 22] Invalid argument处理
		问题: windows平台下使用python open函数w模式打开文件报错“OSError: [Errno 22] Invalid argument: '../news/“消费升维”成零售业新风口? ... 
- tensoboard [Errno 22] Invalid argument 以及 Invalid format string问题解决
		Invalid argument 问题解决: 需要保证tensorboard与tensorflow版本一致. Invalid format string 问题解决: 修改 manager.py 文件中 ... 
随机推荐
- springMVC学习(10)-上传图片
			需求:在修改商品页面,添加上传商品图片功能. SpringMVC中对多部件类型解析: 1)springmvc中配置: <!-- 文件上传 --> <bean id="mul ... 
- ES之六:ElasticSearch中Filter和Query的异同
			如下例子,查找性别是女,所在的州是PA,过滤条件是年龄是39岁,balance大于等于10000的文档: { "query": { "bool": { &quo ... 
- R语言学习——欧拉计划(1)Multiples of 3 and 5
			[题目一]If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. ... 
- MySQL 日期类型及默认设置  (除timestamp类型外,系统不支持其它时间类型字段设置默认值)
			MySQL 日期类型及默认设置 之前在用 MySQL 新建 table,创建日期类型列时遇到了一些问题,现在整理下来以供参考. MySQL 的日期类型如何设置当前时间为其默认值? 答:请使用 time ... 
- How to use POST method in Tornado?
			http://stackoverflow.com/questions/10367981/how-to-use-post-method-in-tornado 
- Northwestern European Regional Contest 2017-I题- Installing Apps题解
			一.题意 有一个手机,容量为$C$,网上有$N$个app,每个app有个安装包大小$d_i$,有个安装后的占用空间大小$s_i$,安装app是瞬间完成的,即app的占用空间可以瞬间由$d_i$变成$s ... 
- Spark分析之TaskScheduler
			TaskScheduler概述: TaskScheduler是一个可插拔任务调度接口,通过不同的SchedulerBackend进行任务的调度.主要功能如下: 1.一个TaskScheduler只为一 ... 
- uva-10004-俩色图验证
			题意: 在1976年,四色猜想被一个计算机助手提出,这个理论表示对任意一个地图的上色都只需要四种颜色,地图内每一个区块和相邻的区块颜色都不相同.你现在被要求解决一个相似但相对简单的问题.给你任意一个连 ... 
- HTML5 Canvas ( 图片绘制 转化为base64 ) drawImage,toDataURL
			<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ... 
- myBatis连接MySQL报异常:No operations allowed after connection closed.Connection was implicitly closed
			网站运行一个晚上,早上来上班,发现报错: ### Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTra ... 
