Task #6477 (closed)
Opened 8 years ago
Closed 8 years ago
BUG: TypeError: int() argument must be a string or a number, not 'NoneType'
| Reported by: | atarkowska | Owned by: | atarkowska |
|---|---|---|---|
| Priority: | minor | Milestone: | OMERO-Beta4.3.2 |
| Component: | Web | Version: | n.a. |
| Keywords: | n.a. | Cc: | |
| Resources: | n.a. | Referenced By: | n.a. |
| References: | n.a. | Remaining Time: | 0.0d |
| Sprint: | 2011-08-18 (3) |
Description (last modified by atarkowska)
In url
(?i)^webgateway/ ^plate/(?P<pid>[^/]+)/(?:(?P<field>[^/]+)/)?$
Field is optional and this code raise error when field is None even arg field=0
try:
field = int(field)
except ValueError:
field = 0
TypeError: int() argument must be a string or a number, not 'NoneType'
or we need to catch TypeError? or
int(value or 0) # 0 if Python considers False
or
int(0 if value is None else value) # is testing for None only
Change History (7)
comment:1 Changed 8 years ago by atarkowska
- Summary changed from BUG to BUG: TypeError: int() argument must be a string or a number, not 'NoneType'
comment:2 Changed 8 years ago by atarkowska
- Description modified (diff)
comment:3 Changed 8 years ago by atarkowska
- Sprint set to 2011-08-18 (3)
comment:4 Changed 8 years ago by atarkowska
- Owner changed from cneves-x to atarkowska
comment:5 Changed 8 years ago by atarkowska
- Status changed from new to accepted
comment:6 Changed 8 years ago by atarkowska
- Remaining Time set to 0.1
comment:7 Changed 8 years ago by atarkowska
- Remaining Time changed from 0.1 to 0
- Resolution set to fixed
- Status changed from accepted to closed
Note: See
TracTickets for help on using
tickets.
You may also have a look at Agilo extensions to the ticket.
(In [a2647333b74a176b45938c3447af65a00968307e/ome.git] on branch develop) this improve SPW support including new Plate viewport. Close #6477 and #5910 and #6483 and #6492 and remaining #3078:1h