草庐IT

ill-defined

全部标签

python - 名称错误 : name 'exit' is not defined

我使用cxfreeze从planrequest.py创建了一个Windows可执行文件。它似乎工作正常,但是当我运行exe文件时,我得到NameError:name'exit'isnotdefinednameexitisnotdefinedinpython说明修复方法是使用importsys。但是,我使用importsys.该代码作为python脚本运行良好(例如,我在编译为可执行文件之前广泛测试了命令行参数。)importsocketimportsysiflen(sys.argv)==1:print("Usage:")print("PlanRequest[RequestString]

python - 名称错误 : global name 'HTTPError' is not defined

我在try子句中有一个命令,我知道它会引发异常。我试图在“except”子句中捕获它,但except子句似乎不承认异常的存在。未处理的异常(即未包含在try子句中)在交互窗口中看起来像这样:Traceback(mostrecentcalllast):File"",line1,inFile"C:\Users\Andy\software\Turkeys\actions.py",line234,inannotateannotation=annotator.ncbo_annotate(thing)File"C:\Users\Andy\software\Turkeys\annotator.py"

python 名称错误: name '__file__' is not defined

这个问题在这里已经有了答案:howcanigettheexecutable'scurrentdirectoryinpy2exe?(4个答案)关闭8年前。我试着用py2exe编译这个脚本:importosfile1=os.path.dirname(os.path.realpath('__file__'))file2=os.path.realpath(__file__)设置脚本:fromdistutils.coreimportsetupimportpy2exeimportsys,osiflen(sys.argv)==1:sys.argv.append("py2exe")setup(opti

javascript - Electron "require is not defined"

我正在制作一个应用程序,我需要授予对文件系统(fs)模块的访问权限,但是即使使用nodeIntegration启用渲染器给我这个错误:UncaughtReferenceError:requireisnotdefined我能找到的所有类似问题都有一个解决方案,说他们需要转nodeIntegration打开,但是我已经启用了它。这是我的main.js:constelectron=require('electron');const{app,BrowserWindow}=electron;letwin;app.on('ready',()=>{var{width,height}=electron

html - Facebook Linter 显示 og :type as webpage when it is defined as company

我有一个公司网页,我也添加了一个Facebook“赞”按钮。我已经为FB和OG定义了namespace,并添加到我所有的元标签中——我的代码如下。网址是www.akascia.com.但是,当我通过Facebooklinter运行网站时,我得到以下结果:应该修复的警告ExtraneousProperty:Objectsofthistypedonotallowpropertiesnamedfb:page_id.ExtraneousProperty:Objectsofthistypedonotallowpropertiesnamedog:email.ExtraneousProperty:O

javascript - Visual Studio typescript "Uncaught ReferenceError: exports is not defined at...."

这个问题在这里已经有了答案:TypescriptReferenceError:exportsisnotdefined(28个答案)关闭3年前。我正在使用visualstudio学习typeScript,并尝试进行简单的类导出。我已经多次看到这个问题,但没有一个解决方案对我有帮助。我做错了什么?我已经将模块系统从CommonJs更改为system我已经安装了npmsystemJs尝试将“导入”写成“///...引用路径..../”还是一样的错误“UncaughtReferenceError:exportsisnotdefinedat...”import{Address}from"./ad

javascript - 无法从主体 onload 调用函数( Uncaught ReferenceError : start is not defined) javascript

我有一个bodyonload在javascript中调用一个函数。我已经尝试了很多东西,但控制台只是打印到错误日志:UncaughtReferenceError:未定义开始。我认为这可能是故障,如果它对您有用,请通知我。我的代码如下:MonsterInvasionvarhur;varmonsters=10;varobjective=false;varhealth=100;vardamage=30;varsheild=false;varea=1;functionstart(){setTimeout(hurt,4000)}functionhurt(){varnewhelth=health-

html - 在 xslt 文件中获取 "prefix ' soap' is not defined"

我正在尝试使用xml数据(来自Web服务的响应)转换字符串。我试图通过获取名称来简单地开始:Name但是,我收到“未定义前缀‘soap’”,我该如何解决这个问题?谢谢。 最佳答案 在XSLT中,XPath表达式中使用的任何namespace前缀都必须在相应的namespace声明中定义。您的代码不是这种情况,因此是错误。解决方案:声明soap命名空间: 关于html-在xslt文件中获取"prefix'soap'isnotdefined",我们在StackOverflow上找到一个类似的

javascript - L is not defined 错误与传单

我正在尝试设置传单并遵循quickstartguide在他们的网站上。但是,我不断收到错误...UncaughtReferenceError:Lisnotdefinedatinitmap(main.js:10)atmain.js:6这似乎是一个导入问题,但我被卡住了。我试过使用他们教程中提供的导入...和但是没有运气......我尝试下载库并将其添加到我的元素中...然后从那里导入,比如......''''但还是报同样的错误。HTMLTitleStateCapitalsStateN/AAlaskaAlabamaArkansasArizonaCaliforniaColoradoConne

javascript - 引用错误 : function is not defined - JavaScript

我正在尝试创建一个Javascript聊天,后端使用Python。这是我正在使用的代码......UDPChatvarchat_room_id=undefined;varlast_received=0;/***Initializechat:*-Settheroomid*-Generatethehtmlelements(chatbox,forms&inputs,etc)*-Syncwithserver*@paramchat_room_idtheidofthechatroom*@paramhtml_el_idtheidofthehtmlelementwherethechathtmlshou