Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/317.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 如何删除Robobrowser中的TypeError_Python_Html_Python 3.x_Web Scraping_Robobrowser - Fatal编程技术网

Python 如何删除Robobrowser中的TypeError

Python 如何删除Robobrowser中的TypeError,python,html,python-3.x,web-scraping,robobrowser,Python,Html,Python 3.x,Web Scraping,Robobrowser,我正试图制作一个程序,重新发行我从大学图书馆借的书,为此我应该将我的USER-ID放入表单并提交,然后完成其余的代码。但我甚至无法获取列出我所有书籍的页面,当我试图打印列出我书籍的页面内容时,我得到了TypeError 这是全部的回溯 Traceback (most recent call last): File "C:/Users/User/PycharmProjects/dictionary/reissue.py", line 43, in <module> sig

我正试图制作一个程序,重新发行我从大学图书馆借的书,为此我应该将我的
USER-ID
放入表单并提交,然后完成其余的代码。但我甚至无法获取列出我所有书籍的页面,当我试图打印列出我书籍的页面内容时,我得到了
TypeError

这是全部的回溯

Traceback (most recent call last):
  File "C:/Users/User/PycharmProjects/dictionary/reissue.py", line 43, in 
<module>
    sign_up['txtmemberid'].value = 'user-id'
TypeError: 'NoneType' object is not subscriptable

Process finished with exit code 1
和表单源代码

<form name="form" method="POST" action="./memberlogin" 
onsubmit="this.onsubmit= function(){return false;}">


<table class="loginTbl" border="1" align="center" cellspacing="3" 
cellpadding="3" width="60%">
   <input type="hidden" name="hdnrequesttype" value="1">
   <thead>
   <tr>
    <td colspan="3" align="middle" class="loginHead">Login</td>
   </tr>
   </thead>

   <tbody class="loginBody">
   <tr>
    <td class="loginBodyTd1" nowrap="nowrap">Employee ID</td>
    <td class="loginBodyTd2"><input type="text" name="txtmemberid" 
id="txtmemberid" value="" class="loginTextBox" size="30" tabindex="1" 
maxlength="8"></td>
    <td class="loginBodyTd3" rowspan="2"><input type="submit" 
class="goclearbutton" value="  Go  " tabindex="3" 
onblur="javascript:setFocus()"></td>

登录
员工ID

有什么帮助吗?

该错误意味着您的变量
注册
。可能是因为您通过
id=“txtmemberid”
引用它,但是
表单
标记不包含该id。我不太了解RoboBrowser,但您可能只能通过类名引用它。或者可能通过
name=“form”
错误仍然存在。@jm.carp很抱歉打扰您,但是您能帮我解决这个问题吗,我看到了关于这个主题的其他stackoverflow问题以及您的答案,并阅读了文档,但这没有帮助,也没有人能够回答这个问题和我以前的
robobrowser
问题,我是新手。错误意味着您的变量
注册
。可能是因为您通过
id=“txtmemberid”
引用它,但是
表单
标记不包含该id。我不太了解RoboBrowser,但您可能只能通过类名引用它。或者可能通过
name=“form”
错误仍然存在。@jm.carp很抱歉打扰您,但是您能帮我解决这个问题吗,我看到了关于这个主题的其他问题和你的答案,并阅读了文档,但这没有帮助,没有人能够回答这个问题和我以前的
robobrowser
问题,我是新手
<form name="form" method="POST" action="./memberlogin" 
onsubmit="this.onsubmit= function(){return false;}">


<table class="loginTbl" border="1" align="center" cellspacing="3" 
cellpadding="3" width="60%">
   <input type="hidden" name="hdnrequesttype" value="1">
   <thead>
   <tr>
    <td colspan="3" align="middle" class="loginHead">Login</td>
   </tr>
   </thead>

   <tbody class="loginBody">
   <tr>
    <td class="loginBodyTd1" nowrap="nowrap">Employee ID</td>
    <td class="loginBodyTd2"><input type="text" name="txtmemberid" 
id="txtmemberid" value="" class="loginTextBox" size="30" tabindex="1" 
maxlength="8"></td>
    <td class="loginBodyTd3" rowspan="2"><input type="submit" 
class="goclearbutton" value="  Go  " tabindex="3" 
onblur="javascript:setFocus()"></td>