Brython Cannot read property '$nat' of undefined
A bug with python in browser. Could somebody suggest a workaround may be?
a bug could be easily reproduced in console brython.info:
Brython 3.7.0 on Netscape 5.0 (Macintosh; Intel Mac OS X 10_14_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
a=b'123'
b=b'1'
b in a
this is an error in js console:
js exc TypeError: Cannot read property '$nat' of undefined
at check_no_kw (brython.js:5920)
at isinstance (brython.js:6356)
at Object.list.__eq__ (brython.js:9850)
at method (brython.js:6266)
at bytes.__eq__ (brython.js:7279)
at method (brython.js:4901)
at Object.int.__eq__ (brython.js:8722)
at method (brython.js:6266)
at Object.$B.rich_comp (brython.js:5884)
at Object.$B.$is_member (brython.js:5593)
brython.js:7035 (2) [Array(5), Array(4)]0: (5) ["__main___myKeyPress_14", {…}, "__main__", {…}, ƒ]1: (4) ["$exec_1984", {…}, "$exec_1984", {…}]length: 2__proto__: Array(0)
brython.js:6983 no class TypeError: Cannot read property '$nat' of undefined
at check_no_kw (brython.js:5920)
at isinstance (brython.js:6356)
at Object.list.__eq__ (brython.js:9850)
at method (brython.js:6266)
at bytes.__eq__ (brython.js:7279)
at method (brython.js:4901)
at Object.int.__eq__ (brython.js:8722)
at method (brython.js:6266)
at Object.$B.rich_comp (brython.js:5884)
at Object.$B.$is_member (brython.js:5593)
brython.js:4922 Error
at Object._b_.AttributeError.$factory (eval at $make_exc (brython.js:7073), <anonymous>:31:340)
at BaseException.__getattr__ (brython.js:7009)
at __BRYTHON__.builtins.object.object.__getattribute__ (brython.js:4921)
at Object.$B.$getattr (brython.js:6283)
at Object.$B.$bool (brython.js:8997)
at Object.bool.$factory (brython.js:9022)
at Object.$B.$test_item (brython.js:5579)
at __init__194 (eval at run_py (brython.js:8050), <anonymous>:2038:78)
at factory (brython.js:5239)
at print_exception161 (eval at run_py (brython.js:8050), <anonymous>:329:138)
`
javascript python brython
add a comment |
A bug with python in browser. Could somebody suggest a workaround may be?
a bug could be easily reproduced in console brython.info:
Brython 3.7.0 on Netscape 5.0 (Macintosh; Intel Mac OS X 10_14_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
a=b'123'
b=b'1'
b in a
this is an error in js console:
js exc TypeError: Cannot read property '$nat' of undefined
at check_no_kw (brython.js:5920)
at isinstance (brython.js:6356)
at Object.list.__eq__ (brython.js:9850)
at method (brython.js:6266)
at bytes.__eq__ (brython.js:7279)
at method (brython.js:4901)
at Object.int.__eq__ (brython.js:8722)
at method (brython.js:6266)
at Object.$B.rich_comp (brython.js:5884)
at Object.$B.$is_member (brython.js:5593)
brython.js:7035 (2) [Array(5), Array(4)]0: (5) ["__main___myKeyPress_14", {…}, "__main__", {…}, ƒ]1: (4) ["$exec_1984", {…}, "$exec_1984", {…}]length: 2__proto__: Array(0)
brython.js:6983 no class TypeError: Cannot read property '$nat' of undefined
at check_no_kw (brython.js:5920)
at isinstance (brython.js:6356)
at Object.list.__eq__ (brython.js:9850)
at method (brython.js:6266)
at bytes.__eq__ (brython.js:7279)
at method (brython.js:4901)
at Object.int.__eq__ (brython.js:8722)
at method (brython.js:6266)
at Object.$B.rich_comp (brython.js:5884)
at Object.$B.$is_member (brython.js:5593)
brython.js:4922 Error
at Object._b_.AttributeError.$factory (eval at $make_exc (brython.js:7073), <anonymous>:31:340)
at BaseException.__getattr__ (brython.js:7009)
at __BRYTHON__.builtins.object.object.__getattribute__ (brython.js:4921)
at Object.$B.$getattr (brython.js:6283)
at Object.$B.$bool (brython.js:8997)
at Object.bool.$factory (brython.js:9022)
at Object.$B.$test_item (brython.js:5579)
at __init__194 (eval at run_py (brython.js:8050), <anonymous>:2038:78)
at factory (brython.js:5239)
at print_exception161 (eval at run_py (brython.js:8050), <anonymous>:329:138)
`
javascript python brython
also same error:>>> 'b' in 'b' True >>> b'b' in b'b'TypeError: Cannot read property '$nat'
– Anatoly r
Nov 12 '18 at 13:08
add a comment |
A bug with python in browser. Could somebody suggest a workaround may be?
a bug could be easily reproduced in console brython.info:
Brython 3.7.0 on Netscape 5.0 (Macintosh; Intel Mac OS X 10_14_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
a=b'123'
b=b'1'
b in a
this is an error in js console:
js exc TypeError: Cannot read property '$nat' of undefined
at check_no_kw (brython.js:5920)
at isinstance (brython.js:6356)
at Object.list.__eq__ (brython.js:9850)
at method (brython.js:6266)
at bytes.__eq__ (brython.js:7279)
at method (brython.js:4901)
at Object.int.__eq__ (brython.js:8722)
at method (brython.js:6266)
at Object.$B.rich_comp (brython.js:5884)
at Object.$B.$is_member (brython.js:5593)
brython.js:7035 (2) [Array(5), Array(4)]0: (5) ["__main___myKeyPress_14", {…}, "__main__", {…}, ƒ]1: (4) ["$exec_1984", {…}, "$exec_1984", {…}]length: 2__proto__: Array(0)
brython.js:6983 no class TypeError: Cannot read property '$nat' of undefined
at check_no_kw (brython.js:5920)
at isinstance (brython.js:6356)
at Object.list.__eq__ (brython.js:9850)
at method (brython.js:6266)
at bytes.__eq__ (brython.js:7279)
at method (brython.js:4901)
at Object.int.__eq__ (brython.js:8722)
at method (brython.js:6266)
at Object.$B.rich_comp (brython.js:5884)
at Object.$B.$is_member (brython.js:5593)
brython.js:4922 Error
at Object._b_.AttributeError.$factory (eval at $make_exc (brython.js:7073), <anonymous>:31:340)
at BaseException.__getattr__ (brython.js:7009)
at __BRYTHON__.builtins.object.object.__getattribute__ (brython.js:4921)
at Object.$B.$getattr (brython.js:6283)
at Object.$B.$bool (brython.js:8997)
at Object.bool.$factory (brython.js:9022)
at Object.$B.$test_item (brython.js:5579)
at __init__194 (eval at run_py (brython.js:8050), <anonymous>:2038:78)
at factory (brython.js:5239)
at print_exception161 (eval at run_py (brython.js:8050), <anonymous>:329:138)
`
javascript python brython
A bug with python in browser. Could somebody suggest a workaround may be?
a bug could be easily reproduced in console brython.info:
Brython 3.7.0 on Netscape 5.0 (Macintosh; Intel Mac OS X 10_14_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
a=b'123'
b=b'1'
b in a
this is an error in js console:
js exc TypeError: Cannot read property '$nat' of undefined
at check_no_kw (brython.js:5920)
at isinstance (brython.js:6356)
at Object.list.__eq__ (brython.js:9850)
at method (brython.js:6266)
at bytes.__eq__ (brython.js:7279)
at method (brython.js:4901)
at Object.int.__eq__ (brython.js:8722)
at method (brython.js:6266)
at Object.$B.rich_comp (brython.js:5884)
at Object.$B.$is_member (brython.js:5593)
brython.js:7035 (2) [Array(5), Array(4)]0: (5) ["__main___myKeyPress_14", {…}, "__main__", {…}, ƒ]1: (4) ["$exec_1984", {…}, "$exec_1984", {…}]length: 2__proto__: Array(0)
brython.js:6983 no class TypeError: Cannot read property '$nat' of undefined
at check_no_kw (brython.js:5920)
at isinstance (brython.js:6356)
at Object.list.__eq__ (brython.js:9850)
at method (brython.js:6266)
at bytes.__eq__ (brython.js:7279)
at method (brython.js:4901)
at Object.int.__eq__ (brython.js:8722)
at method (brython.js:6266)
at Object.$B.rich_comp (brython.js:5884)
at Object.$B.$is_member (brython.js:5593)
brython.js:4922 Error
at Object._b_.AttributeError.$factory (eval at $make_exc (brython.js:7073), <anonymous>:31:340)
at BaseException.__getattr__ (brython.js:7009)
at __BRYTHON__.builtins.object.object.__getattribute__ (brython.js:4921)
at Object.$B.$getattr (brython.js:6283)
at Object.$B.$bool (brython.js:8997)
at Object.bool.$factory (brython.js:9022)
at Object.$B.$test_item (brython.js:5579)
at __init__194 (eval at run_py (brython.js:8050), <anonymous>:2038:78)
at factory (brython.js:5239)
at print_exception161 (eval at run_py (brython.js:8050), <anonymous>:329:138)
`
javascript python brython
javascript python brython
asked Nov 12 '18 at 13:02
Anatoly rAnatoly r
11
11
also same error:>>> 'b' in 'b' True >>> b'b' in b'b'TypeError: Cannot read property '$nat'
– Anatoly r
Nov 12 '18 at 13:08
add a comment |
also same error:>>> 'b' in 'b' True >>> b'b' in b'b'TypeError: Cannot read property '$nat'
– Anatoly r
Nov 12 '18 at 13:08
also same error:
>>> 'b' in 'b' True >>> b'b' in b'b' TypeError: Cannot read property '$nat'– Anatoly r
Nov 12 '18 at 13:08
also same error:
>>> 'b' in 'b' True >>> b'b' in b'b' TypeError: Cannot read property '$nat'– Anatoly r
Nov 12 '18 at 13:08
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53262770%2fbrython-cannot-read-property-nat-of-undefined%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53262770%2fbrython-cannot-read-property-nat-of-undefined%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
also same error:
>>> 'b' in 'b' True >>> b'b' in b'b'TypeError: Cannot read property '$nat'– Anatoly r
Nov 12 '18 at 13:08