Câu hỏi được gắn thẻ «typeerror»

7
super () tăng lên Loại TypeError: phải là loại chứ không phải classobj 'cho lớp kiểu mới
Việc sử dụng sau đây super()làm tăng TypeError: tại sao? >>> from HTMLParser import HTMLParser >>> class TextParser(HTMLParser): ... def __init__(self): ... super(TextParser, self).__init__() ... self.all_data = [] ... >>> TextParser() (...) TypeError: must be type, not classobj Có một câu hỏi tương tự trên StackOverflow: Python super () làm …



10
Loại TypeError: (Integer) không phải là tuần tự hóa JSON khi tuần tự hóa JSON trong Python?
Tôi đang cố gắng gửi một từ điển đơn giản đến một tệp json từ python, nhưng tôi vẫn nhận được thông báo "TypeError: 1425 không phải là tuần tự hóa JSON". import json alerts = {'upper':[1425],'lower':[576],'level':[2],'datetime':['2012-08-08 15:30']} afile = open('test.json','w') afile.write(json.dumps(alerts,encoding='UTF-8')) afile.close() Nếu tôi thêm đối số mặc định, …



3
Loại Uncaught LoạiError: Gọi bất hợp pháp
Khi tôi sử dụng requestAnimationFrameđể thực hiện một số hình ảnh động được hỗ trợ riêng với mã bên dưới: var support = { animationFrame: window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame || window.oRequestAnimationFrame }; support.animationFrame(function() {}); //error support.animationFrame.call(window, function() {}); //right Gọi trực tiếp support.animationFramesẽ cho ... Uncaught TypeError: …



Khi sử dụng trang web của chúng tôi, bạn xác nhận rằng bạn đã đọc và hiểu Chính sách cookieChính sách bảo mật của chúng tôi.
Licensed under cc by-sa 3.0 with attribution required.