Error display:
Error code display
Error analysis:
print 'URL Num:'
It prints out the string type, not the
(self.urls.has_new_url() )
The output is numeric (int type), so it needs to be transformed
That is, the code should be changed to:
Knowledge supplement:
Conversion specifier:
Transfer specifier | Meaning |
%d,%i | Signed decimal integer |
%o | Unsigned octal |
%u | Decimal without sign |
%x | Unsigned hexadecimal (lowercase) |
%X | Unsigned hexadecimal (upper case) |
%e | Floating point numbers in scientific counting (lower case) |
%E | Floating point numbers in scientific counting |
%f,%F | Decimal floating point number |
%g | If the exponent is greater than – 4 or less than the precision value, it is the same as e, otherwise it is the same as f |
%G | If the exponent is greater than – 4 or less than the precision value, it is the same as e, otherwise it is the same as f |
%C | Single character (accepts integers or single character strings) |
%r | String (use repr to convert any Python object) |
%s | String (use STR to convert any Python object) |
Similar Posts:
- [Solved] json.decoder.JSONDecodeError: Expecting ‘,‘ delimiter: line xx column xx (char xxx)
- URL transcoding (including Chinese): 3A to ‘:’,% 2F to ‘/’
- [Solved] net.sf.json.JSONException: java.lang.ClassCastException: JSON keys must be strings.
- ToFixed, toexponential, toprecision in JS
- [Solved] mapper.xml Error: java.lang.AbstractMethodError: Method oracle/jdbc/driver/OracleResultSetImpl.getNString(Ljava/lang/String;)Ljava/lang/String; is abstract,
- [Solved] Division Error: java.lang.ArithmeticException: Non-terminating decimal expansion; no exact representable decimal result.
- Image data type conversion uint8 and double in MATLAB
- [Solved] Oracle sql Use sys_guid() to Generate 32-bit id garbled
- [Solved] error: aggregate value used where an integer was expected