Python3.x运行Python2.x代码报错 syntax error "Missing parentheses in call to 'print'
#另外一种错误
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(
查看代码,格式如下:
print "文件%s不存在" % filename
。。。
print '-------xxx------' 改成
print ("文件%s不存在" % filename)
print ('-------xxx------')
Python3.x运行Python2.x代码报错 syntax error "Missing parentheses in call to 'print'的更多相关文章
- 关于报错“syntax error near unexpected token `”和回车换行
本来是很简单一个事情,转过来是因为打字机这事比较有趣…… http://blog.csdn.net/xyp84/archive/2009/08/11/4435899.aspx 摘要一下: 回车 换行 ...
- 一个参数大小写引发的uploadify报错 "Syntax error, unrecognized expression: #"
上传控件uploadify 报错"Syntax error, unrecognized expression: #" 版本为 uploadify3.2 报错原因:参数ID[hi ...
- JS function document.onclick(){}报错Syntax error on token "function", delete this token
JS function document.onclick(){}报错Syntax error on token "function", delete this token func ...
- JS function document.onclick(){}报错Syntax error on token "function", delete this token - CSDN博客
原文:JS function document.onclick(){}报错Syntax error on token "function", delete this token - ...
- 【问题与解决】Github 上传代码报错(error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version)
今天修改了GitHub 的代码,代码更新,想上传更新,却发现上传报错. 错误代码:error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 al ...
- linux shell 报错 Syntax error: Bad for loop variable
在linux下写了一个简单的shell,循环10次. test.sh #!/bin/bash ## ##循环10次 ## ; i<; i++)); do echo Good Morning ,t ...
- php Yii2使用registerJs或registerCss报错syntax error, unexpected end of file
解决方法: 注册时$js=<<<JS .....JS;//结尾处JS;应单独成行并且没有空格 JS;//这样就会报错,多了空格JS;//这样就不会
- artTemplate--使用artTemplate时,由于json对象属性有数字命名格式 导致调用报错 syntax error
案例 今天在使用artTemplate做开发时,遇到一个比较奇葩的问题,就是使用json对象去获取值得时候,报如下错误: Template Error <temp> function an ...
- js文件报错Syntax error on token "Invalid Regular Expression Options", no accurate correction
Syntax error on token "Invalid Regular Expression Options", no accurate correction 1.选中报错的 ...
随机推荐
- C#原子操作(Interlocked.Decrement和Interlocked.Increment)
一.概念 在多线程环境中,不会被线程调度机制打断的操作:这种操作一旦开始,就一直运行到结束,中间不会有任何 context switch (切换到另一个线程). 二.类 System.Threadin ...
- 【pip】使用
错误及解决 install 1.pip install aip 报错[Windows,python3.6] ERROR: Could not find a version that satisfies ...
- kettle 数据抽取时会出现 无法插入NULL
kettle 数据抽取时会出现 无法插入NULL,其实是空字符串,原因是kettle默认不区分空字符串和NULL. 解决办法: 修改kettle.properties 文件:
- 基于STM32调试工具STM-STUDIO-STM32的使用
手上有stlink下载器,正好看到官网有这个工具,可以在运行中实时查看变量的数据.这一点和ucos的ucprobe很类似. 参考https://mp.weixin.qq.com/s?src=11&am ...
- php操作kafka
php操作kafka----可以参照网上的安装步骤,先安装ldkafka rdkafka,然乎启动zookeeper和kafka服务器 <?php //$conf = new Rdkafka\P ...
- python--openCV--图像处理
安装 pip3 install opencv-python 图像处理: import cv2 #导入opencv库 import numpy as np img = cv2.imread(" ...
- selenium+pyquery爬取淘宝商品信息
import re from selenium import webdriver from selenium.common.exceptions import TimeoutException fro ...
- 【leetcode】1289. Minimum Falling Path Sum II
题目如下: Given a square grid of integers arr, a falling path with non-zero shifts is a choice of exactl ...
- java+http文件夹上传
在web项目中上传文件夹现在已经成为了一个主流的需求.在OA,或者企业ERP系统中都有类似的需求.上传文件夹并且保留层级结构能够对用户行成很好的引导,用户使用起来也更方便.能够提供更高级的应用支撑. ...
- Codevs 1331 西行寺幽幽子(高精度)
1331 西行寺幽幽子 时间限制: 1 s 空间限制: 128000 KB 题目等级 : 黄金 Gold 题目描述 Description 在幻想乡,西行寺幽幽子是以贪吃闻名的亡灵.不过幽幽子可不是只 ...