after_merge stringlengths 28 79.6k | before_merge stringlengths 20 79.6k | url stringlengths 38 71 | full_traceback stringlengths 43 922k | traceback_type stringclasses 555
values |
|---|---|---|---|---|
def process_bookmark(hide="n", start_page=1, end_page=0):
try:
total_list = list()
print(f"My Member Id = {__br__._myId}")
if hide != "o":
print("Importing Bookmarks...")
total_list.extend(get_bookmarks(False, start_page, end_page, __br__._myId))
if hide != "n... | def process_bookmark(hide="n", start_page=1, end_page=0):
try:
total_list = list()
if hide != "o":
print("Importing Bookmarks...")
total_list.extend(get_bookmarks(False, start_page, end_page))
if hide != "n":
print("Importing Private Bookmarks...")
... | https://github.com/Nandaka/PixivUtil2/issues/622 | Input: 5
Include Private bookmarks [y/n/o]:
Start Page (default=1):
End Page (default=0, 0 for no limit):
Importing Bookmarks...
Exporting page 1
Source URL: https://www.pixiv.net/bookmark.php?type=user&p=1
Using default DB Path: /mnt/c/PixivUtil2/db.sqlite
No more data
Result: 0 items.
Error at process_bookmark()... | ZeroDivisionError |
def writeConfig(self, error=False, path=None):
"""Backup old config if exist and write updated config.ini"""
print("Writing config file...", end=" ")
config = configparser.RawConfigParser()
config.add_section("Network")
config.set("Network", "useProxy", self.useProxy)
config.set("Network", "pro... | def writeConfig(self, error=False, path=None):
"""Backup old config if exist and write updated config.ini"""
print("Writing config file...", end=" ")
config = configparser.RawConfigParser()
config.add_section("Network")
config.set("Network", "useProxy", self.useProxy)
config.set("Network", "pro... | https://github.com/Nandaka/PixivUtil2/issues/606 | 2019-12-27 21:16:44,158 - PixivUtil20191221 - ERROR - Error at loadConfig()
Traceback (most recent call last):
File "PixivConfig.pyc", line 125, in loadConfig
File "configparser.pyc", line 718, in read_file
File "configparser.pyc", line 1017, in _read
File "codecs.pyc", line 714, in __next__
File "codecs.pyc", line 645... | UnicodeDecodeError |
def dump_html(filename, html_text):
isDumpEnabled = True
filename = sanitize_filename(filename)
if _config is not None:
isDumpEnabled = _config.enableDump
if _config.enableDump:
if len(_config.skipDumpFilter) > 0:
matchResult = re.findall(_config.skipDumpFilter, f... | def dump_html(filename, html_text):
isDumpEnabled = True
filename = sanitize_filename(filename)
if _config is not None:
isDumpEnabled = _config.enableDump
if _config.enableDump:
if len(_config.skipDumpFilter) > 0:
matchResult = re.findall(_config.skipDumpFilter, f... | https://github.com/Nandaka/PixivUtil2/issues/580 | Input: 1
Member ids: 668238
Start Page (default=1):
End Page (default=0, 0 for no limit):
Member IDs: [668238]
Processing Member Id: 668238
Reading /mnt/c/PixivUtil2/config.ini ...
done.
Page 1
Member Url: https://www.pixiv.net/ajax/user/668238/profile/all
Member ID (668238): 1002 This user account has been suspended.... | ValueError |
def dump_html(filename, html_text):
isDumpEnabled = True
filename = sanitize_filename(filename)
if _config is not None:
isDumpEnabled = _config.enableDump
if _config.enableDump:
if len(_config.skipDumpFilter) > 0:
matchResult = re.findall(_config.skipDumpFilter, f... | def dump_html(filename, html_text):
isDumpEnabled = True
filename = sanitize_filename(filename)
if _config is not None:
isDumpEnabled = _config.enableDump
if _config.enableDump:
if len(_config.skipDumpFilter) > 0:
matchResult = re.findall(_config.skipDumpFilter, f... | https://github.com/Nandaka/PixivUtil2/issues/580 | Input: 1
Member ids: 668238
Start Page (default=1):
End Page (default=0, 0 for no limit):
Member IDs: [668238]
Processing Member Id: 668238
Reading /mnt/c/PixivUtil2/config.ini ...
done.
Page 1
Member Url: https://www.pixiv.net/ajax/user/668238/profile/all
Member ID (668238): 1002 This user account has been suspended.... | ValueError |
def WriteInfo(self, filename):
info = None
try:
# Issue #421 ensure subdir exists.
PixivHelper.makeSubdirs(filename)
info = codecs.open(filename, "wb", encoding="utf-8")
except IOError:
info = codecs.open(str(self.imageId) + ".txt", "wb", encoding="utf-8")
PixivHelpe... | def WriteInfo(self, filename):
info = None
try:
# Issue #421 ensure subdir exists.
PixivHelper.makeSubdirs(filename)
info = codecs.open(filename, "wb", encoding="utf-8")
except IOError:
info = codecs.open(str(self.imageId) + ".txt", "wb", encoding="utf-8")
PixivHelpe... | https://github.com/Nandaka/PixivUtil2/issues/540 | Traceback (most recent call last):
File "PixivUtil2.py", line 270, in download_image
File "zipfile.pyc", line 901, in testzip
File "zipfile.pyc", line 993, in open
RuntimeError: File cover.jpg is encrypted, password required for extraction
Error at download_image(): (<type 'exceptions.RuntimeError'>, RuntimeError('File... | RuntimeError |
def follow_user(browser, follow_restrict, login, user_name):
"""Follows the user of the currently opened image"""
try:
follow_button = browser.find_element_by_xpath("//*[contains(text(), 'Follow')]")
sleep(2) # Do we still need this sleep?
if follow_button.is_displayed():
... | def follow_user(browser, follow_restrict, login, user_name):
"""Follows the user of the currently opened image"""
try:
follow_button = browser.find_element_by_xpath("//*[contains(text(), 'Follow')]")
sleep(2) # Do we still need this sleep?
follow_button.send_keys("\n")
print("... | https://github.com/timgrossmann/InstaPy/issues/615 | [7/33]
Image from: b'bruhmusicals'
Number of Followers: 399157
Link: b'https://www.instagram.com/p/BYdcFanFczK/?tagged=followme'
Description: b'Comment "prank" letter by letter\xf0\x9f\x98\x82 // Follow @bruhmusicals if you\'re viewing\xf0\x9f\x94\xa5'
--> Image Liked!
--> Commented: b'Super!'
Traceback (most recent ca... | selenium.common.exceptions.ElementNotVisibleException |
def interact_user_followers(self, usernames, amount=10, random=False):
userToInteract = []
if not isinstance(usernames, list):
usernames = [usernames]
try:
for user in usernames:
user = get_given_user_followers(
self.browser,
user,
... | def interact_user_followers(self, usernames, amount=10, random=False):
userToInteract = []
if not isinstance(usernames, list):
usernames = [usernames]
try:
for user in usernames:
userToInteract += get_given_user_followers(
self.browser,
user,
... | https://github.com/timgrossmann/InstaPy/issues/751 | Logged in successfully!
Traceback (most recent call last):
File "test4_instapy.py", line 24, in <module>
session.interact_user_followers(['User1'], amount=12, random=True)
File "/virt_uni/InstaPy/instapy/instapy.py", line 849, in interact_user_followers
userToInteract += get_given_user_followers(self.browser, user, amo... | selenium.common.exceptions.NoSuchElementException |
def get_given_user_followers(
browser, user_name, amount, dont_include, login, follow_restrict, is_random
):
browser.get("https://www.instagram.com/" + user_name)
# check how many poeple are following this user.
# throw RuntimeWarning if we are 0 people following this user or
# if its a private acc... | def get_given_user_followers(
browser, user_name, amount, dont_include, login, follow_restrict, is_random
):
browser.get("https://www.instagram.com/" + user_name)
# check how many poeple are following this user.
allfollowing = formatNumber(browser.find_element_by_xpath("//li[2]/a/span").text)
# ... | https://github.com/timgrossmann/InstaPy/issues/751 | Logged in successfully!
Traceback (most recent call last):
File "test4_instapy.py", line 24, in <module>
session.interact_user_followers(['User1'], amount=12, random=True)
File "/virt_uni/InstaPy/instapy/instapy.py", line 849, in interact_user_followers
userToInteract += get_given_user_followers(self.browser, user, amo... | selenium.common.exceptions.NoSuchElementException |
def follow_through_dialog(
browser,
user_name,
amount,
dont_include,
login,
follow_restrict,
allfollowing,
is_random,
delay,
callbacks=[],
):
followNum = 0
sleep(2)
person_followed = []
if is_random:
# expanding the popultaion for better sampling distribu... | def follow_through_dialog(
browser,
user_name,
amount,
dont_include,
login,
follow_restrict,
allfollowing,
is_random,
delay,
callbacks=[],
):
followNum = 0
sleep(2)
person_followed = []
if is_random:
# expanding the popultaion for better sampling distribu... | https://github.com/timgrossmann/InstaPy/issues/671 | Traceback (most recent call last):
File "example.py", line 18, in <module>
session.follow_user_followers(['timanderic', 'SuperDeluxe'], amount=10, random=False, sleep_delay=0)
File "/Users/Travis/Documents/GitHub/InstaPy/instapy/instapy.py", line 902, in follow_user_followers
userFollowed += follow_given_user_follo... | IndexError |
def login_user(browser, username, password, switch_language=True):
"""Logins the user with the given username and password"""
browser.get("https://www.instagram.com")
# Changes instagram language to english, to ensure no errors ensue from having the site on a different language
# Might cause problems i... | def login_user(browser, username, password, switch_language=True):
"""Logins the user with the given username and password"""
browser.get("https://www.instagram.com")
# Changes instagram language to english, to ensure no errors ensue from having the site on a different language
# Might cause problems i... | https://github.com/timgrossmann/InstaPy/issues/498 | Traceback (most recent call last):
File "insta_script.py", line 495, in <module>
session.login()
File "/home/pi/Projects/InstaPy/instapy/instapy.py", line 146, in login
if not login_user(self.browser, self.username, self.password, self.switch_language):
File "/home/pi/Projects/InstaPy/instapy/login_util.py", line 13, i... | selenium.common.exceptions.NoSuchElementException |
def __init__(self, username=None, password=None, nogui=False):
if nogui:
self.display = Display(visible=0, size=(800, 600))
self.display.start()
chromedriver_location = "./assets/chromedriver"
chrome_options = Options()
chrome_options.add_argument("--dns-prefetch-disable")
chrome_op... | def __init__(self, username=None, password=None, nogui=False):
if nogui:
self.display = Display(visible=0, size=(800, 600))
self.display.start()
chrome_options = Options()
chrome_options.add_argument("--dns-prefetch-disable")
chrome_options.add_argument("--no-sandbox")
chrome_option... | https://github.com/timgrossmann/InstaPy/issues/338 | Traceback (most recent call last):
File "LikeSCript.py", line 16, in <module>
.like_by_tags([<My Tags>], amount=300, media='Photo')\
File "/root/InstaPy/instapy/instapy.py", line 386, in like_by_tags
liked = like_image(self.browser)
File "/root/InstaPy/instapy/like_util.py", line 279, in like_image
browser.execute_scri... | selenium.common.exceptions.WebDriverException |
def __init__(self, username=None, password=None, nogui=False):
if nogui:
self.display = Display(visible=0, size=(800, 600))
self.display.start()
chromedriver_location = "./assets/chromedriver"
chrome_options = Options()
chrome_options.add_argument("--dns-prefetch-disable")
chrome_op... | def __init__(self, username=None, password=None, nogui=False):
if nogui:
self.display = Display(visible=0, size=(800, 600))
self.display.start()
chrome_options = Options()
chrome_options.add_argument("--dns-prefetch-disable")
chrome_options.add_argument("--no-sandbox")
chrome_option... | https://github.com/timgrossmann/InstaPy/issues/338 | Traceback (most recent call last):
File "LikeSCript.py", line 16, in <module>
.like_by_tags([<My Tags>], amount=300, media='Photo')\
File "/root/InstaPy/instapy/instapy.py", line 386, in like_by_tags
liked = like_image(self.browser)
File "/root/InstaPy/instapy/like_util.py", line 279, in like_image
browser.execute_scri... | selenium.common.exceptions.WebDriverException |
def _get_unitary_matrix(self, unitary):
"""Return the matrix representing a unitary operation.
Args:
unitary (~.Operation): a PennyLane unitary operation
Returns:
array[complex]: Returns a 2D matrix representation of
the unitary in the computational basis, or, in the case of a diag... | def _get_unitary_matrix(self, unitary):
"""Return the matrix representing a unitary operation.
Args:
unitary (~.Operation): a PennyLane unitary operation
Returns:
array[complex]: Returns a 2D matrix representation of
the unitary in the computational basis, or, in the case of a diag... | https://github.com/PennyLaneAI/pennylane/issues/1071 | import pennylane as qml
dev = qml.device('default.qubit', wires=2)
@qml.qnode(dev)
... def circuit(x):
... qml.RZ(x, wires=1).inv()
... return qml.expval(qml.PauliZ(0))
...
circuit(0)
tensor(1., requires_grad=True)
opt = qml.GradientDescentOptimizer(0.1)
x0 = 0.5
opt.step(circuit, x0)
Traceback (most recent cal... | TypeError |
def _get_unitary_matrix(self, unitary):
"""Return the matrix representing a unitary operation.
Args:
unitary (~.Operation): a PennyLane unitary operation
Returns:
tf.Tensor[complex] or array[complex]: Returns a 2D matrix representation of
the unitary in the computational basis, or,... | def _get_unitary_matrix(self, unitary):
"""Return the matrix representing a unitary operation.
Args:
unitary (~.Operation): a PennyLane unitary operation
Returns:
tf.Tensor[complex] or array[complex]: Returns a 2D matrix representation of
the unitary in the computational basis, or,... | https://github.com/PennyLaneAI/pennylane/issues/1071 | import pennylane as qml
dev = qml.device('default.qubit', wires=2)
@qml.qnode(dev)
... def circuit(x):
... qml.RZ(x, wires=1).inv()
... return qml.expval(qml.PauliZ(0))
...
circuit(0)
tensor(1., requires_grad=True)
opt = qml.GradientDescentOptimizer(0.1)
x0 = 0.5
opt.step(circuit, x0)
Traceback (most recent cal... | TypeError |
def to_torch(qnode):
"""Function that accepts a :class:`~.QNode`, and returns a PyTorch-compatible QNode.
Args:
qnode (~pennylane.qnode.QNode): a PennyLane QNode
Returns:
torch.autograd.Function: the QNode as a PyTorch autograd function
"""
qnode_interface = getattr(qnode, "interfa... | def to_torch(qnode):
"""Function that accepts a :class:`~.QNode`, and returns a PyTorch-compatible QNode.
Args:
qnode (~pennylane.qnode.QNode): a PennyLane QNode
Returns:
torch.autograd.Function: the QNode as a PyTorch autograd function
"""
qnode_interface = getattr(qnode, "interfa... | https://github.com/PennyLaneAI/pennylane/issues/709 | Traceback (most recent call last):
File "qdqn.py", line 328, in <module>
loss.backward() #computes gradient of loss with respect to all weights n biases in the policy net
File "/home/ubuntu/anaconda3/envs/gymm/lib/python3.8/site-packages/torch/tensor.py", line 198, in backward
torch.autograd.backward(self, gradient, re... | RuntimeError |
def backward(ctx, grad_output): # pragma: no cover
"""Implements the backwards pass QNode vector-Jacobian product"""
# NOTE: This method is definitely tested by the `test_torch.py` test suite,
# however does not show up in the coverage. This is likely due to
# subtleties in the torch.autograd.FunctionM... | def backward(ctx, grad_output): # pragma: no cover
"""Implements the backwards pass QNode vector-Jacobian product"""
# NOTE: This method is definitely tested by the `test_torch.py` test suite,
# however does not show up in the coverage. This is likely due to
# subtleties in the torch.autograd.FunctionM... | https://github.com/PennyLaneAI/pennylane/issues/709 | Traceback (most recent call last):
File "qdqn.py", line 328, in <module>
loss.backward() #computes gradient of loss with respect to all weights n biases in the policy net
File "/home/ubuntu/anaconda3/envs/gymm/lib/python3.8/site-packages/torch/tensor.py", line 198, in backward
torch.autograd.backward(self, gradient, re... | RuntimeError |
def _evaluate_qnode(self, x):
"""Evaluates the QNode for a single input datapoint.
Args:
x (tensor): the datapoint
Returns:
tensor: output datapoint
"""
if qml.tape_mode_active():
return self._evaluate_qnode_tape_mode(x)
qnode = self.qnode
for arg in self.sig:
... | def _evaluate_qnode(self, x):
"""Evaluates the QNode for a single input datapoint.
Args:
x (tensor): the datapoint
Returns:
tensor: output datapoint
"""
if qml.tape_mode_active():
return self._evaluate_qnode_tape_mode(x)
qnode = self.qnode
for arg in self.sig:
... | https://github.com/PennyLaneAI/pennylane/issues/709 | Traceback (most recent call last):
File "qdqn.py", line 328, in <module>
loss.backward() #computes gradient of loss with respect to all weights n biases in the policy net
File "/home/ubuntu/anaconda3/envs/gymm/lib/python3.8/site-packages/torch/tensor.py", line 198, in backward
torch.autograd.backward(self, gradient, re... | RuntimeError |
def _evaluate_qnode_tape_mode(self, x):
"""Evaluates a tape-mode QNode for a single input datapoint.
Args:
x (tensor): the datapoint
Returns:
tensor: output datapoint
"""
kwargs = {
**{self.input_arg: x},
**{arg: weight.to(x) for arg, weight in self.qnode_weights.it... | def _evaluate_qnode_tape_mode(self, x):
"""Evaluates a tape-mode QNode for a single input datapoint.
Args:
x (tensor): the datapoint
Returns:
tensor: output datapoint
"""
kwargs = {**{self.input_arg: x}, **self.qnode_weights}
return self.qnode(**kwargs).type(x.dtype)
| https://github.com/PennyLaneAI/pennylane/issues/709 | Traceback (most recent call last):
File "qdqn.py", line 328, in <module>
loss.backward() #computes gradient of loss with respect to all weights n biases in the policy net
File "/home/ubuntu/anaconda3/envs/gymm/lib/python3.8/site-packages/torch/tensor.py", line 198, in backward
torch.autograd.backward(self, gradient, re... | RuntimeError |
def backward(ctx, grad_output): # pragma: no cover
"""Implements the backwards pass QNode vector-Jacobian product"""
tape = ctx.kwargs["tape"]
device = ctx.kwargs["device"]
tape.set_parameters(ctx.all_params_unwrapped, trainable_only=False)
jacobian = tape.jacobian(device, params=ctx.args, **tape.... | def backward(ctx, grad_output): # pragma: no cover
"""Implements the backwards pass QNode vector-Jacobian product"""
tape = ctx.kwargs["tape"]
device = ctx.kwargs["device"]
tape.set_parameters(ctx.all_params_unwrapped, trainable_only=False)
jacobian = tape.jacobian(device, params=ctx.args, **tape.... | https://github.com/PennyLaneAI/pennylane/issues/709 | Traceback (most recent call last):
File "qdqn.py", line 328, in <module>
loss.backward() #computes gradient of loss with respect to all weights n biases in the policy net
File "/home/ubuntu/anaconda3/envs/gymm/lib/python3.8/site-packages/torch/tensor.py", line 198, in backward
torch.autograd.backward(self, gradient, re... | RuntimeError |
def __init__(self, *params, wires=None, do_queue=True):
super().__init__(*params, wires=wires, do_queue=True)
pauli_word = params[1]
if not PauliRot._check_pauli_word(pauli_word):
raise ValueError(
'The given Pauli word "{}" contains characters that are not allowed.'
" Allo... | def __init__(self, *params, wires=None, do_queue=True):
super().__init__(*params, wires=wires, do_queue=True)
pauli_word = params[1]
if not PauliRot._check_pauli_word(pauli_word):
raise ValueError(
'The given Pauli word "{}" contains characters that are not allowed.'
" Allo... | https://github.com/PennyLaneAI/pennylane/issues/856 | ----------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-27-611f77c1af9c> in <module>
12 return qml.expval(qml.PauliX(1))
13
---> 14 print(apply_pauli_rots(0.345))
~/Software/anaconda3/envs/test-xanadu/lib/python3.8/site-packages/pennylane/interfaces/... | ValueError |
def _matrix(cls, *params):
theta = params[0]
pauli_word = params[1]
if not PauliRot._check_pauli_word(pauli_word):
raise ValueError(
'The given Pauli word "{}" contains characters that are not allowed.'
" Allowed characters are I, X, Y and Z".format(pauli_word)
)
... | def _matrix(cls, *params):
theta = params[0]
pauli_word = params[1]
if not PauliRot._check_pauli_word(pauli_word):
raise ValueError(
'The given Pauli word "{}" contains characters that are not allowed.'
" Allowed characters are I, X, Y and Z".format(pauli_word)
)
... | https://github.com/PennyLaneAI/pennylane/issues/856 | ----------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-27-611f77c1af9c> in <module>
12 return qml.expval(qml.PauliX(1))
13
---> 14 print(apply_pauli_rots(0.345))
~/Software/anaconda3/envs/test-xanadu/lib/python3.8/site-packages/pennylane/interfaces/... | ValueError |
def _eigvals(cls, theta, pauli_word):
# Identity must be treated specially because its eigenvalues are all the same
if pauli_word == "I" * len(pauli_word):
return np.exp(-1j * theta / 2) * np.ones(2 ** len(pauli_word))
return MultiRZ._eigvals(theta, len(pauli_word))
| def _eigvals(cls, theta, pauli_word):
return MultiRZ._eigvals(theta, len(pauli_word))
| https://github.com/PennyLaneAI/pennylane/issues/856 | ----------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-27-611f77c1af9c> in <module>
12 return qml.expval(qml.PauliX(1))
13
---> 14 print(apply_pauli_rots(0.345))
~/Software/anaconda3/envs/test-xanadu/lib/python3.8/site-packages/pennylane/interfaces/... | ValueError |
def decomposition(theta, pauli_word, wires):
# Catch cases when the wire is passed as a single int.
if isinstance(wires, int):
wires = [wires]
# Check for identity and do nothing
if pauli_word == "I" * len(wires):
return
active_wires, active_gates = zip(
*[(wire, gate) for ... | def decomposition(theta, pauli_word, wires):
active_wires, active_gates = zip(
*[(wire, gate) for wire, gate in zip(wires, pauli_word) if gate != "I"]
)
for wire, gate in zip(active_wires, active_gates):
if gate == "X":
Hadamard(wires=[wire])
elif gate == "Y":
... | https://github.com/PennyLaneAI/pennylane/issues/856 | ----------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-27-611f77c1af9c> in <module>
12 return qml.expval(qml.PauliX(1))
13
---> 14 print(apply_pauli_rots(0.345))
~/Software/anaconda3/envs/test-xanadu/lib/python3.8/site-packages/pennylane/interfaces/... | ValueError |
def run_wsgi(self):
if self.headers.get("Expect", "").lower().strip() == "100-continue":
self.wfile.write(b"HTTP/1.1 100 Continue\r\n\r\n")
self.environ = environ = self.make_environ()
headers_set = []
headers_sent = []
def write(data):
assert headers_set, "write() before start_res... | def run_wsgi(self):
if self.headers.get("Expect", "").lower().strip() == "100-continue":
self.wfile.write(b"HTTP/1.1 100 Continue\r\n\r\n")
self.environ = environ = self.make_environ()
headers_set = []
headers_sent = []
def write(data):
assert headers_set, "write() before start_res... | https://github.com/pallets/werkzeug/issues/1659 | Error on request:
Traceback (most recent call last):
File "/home/relent95/.local/lib/python3.5/site-packages/werkzeug/serving.py", line 303, in run_wsgi
execute(self.server.app)
File "/home/relent95/.local/lib/python3.5/site-packages/werkzeug/serving.py", line 294, in execute
write(data)
File "/home/relent95/.local/lib... | ssl.SSLEOFError |
def write(data):
assert headers_set, "write() before start_response"
if not headers_sent:
status, response_headers = headers_sent[:] = headers_set
try:
code, msg = status.split(None, 1)
except ValueError:
code, msg = status, ""
code = int(code)
sel... | def write(data):
assert headers_set, "write() before start_response"
if not headers_sent:
status, response_headers = headers_sent[:] = headers_set
try:
code, msg = status.split(None, 1)
except ValueError:
code, msg = status, ""
code = int(code)
sel... | https://github.com/pallets/werkzeug/issues/1659 | Error on request:
Traceback (most recent call last):
File "/home/relent95/.local/lib/python3.5/site-packages/werkzeug/serving.py", line 303, in run_wsgi
execute(self.server.app)
File "/home/relent95/.local/lib/python3.5/site-packages/werkzeug/serving.py", line 294, in execute
write(data)
File "/home/relent95/.local/lib... | ssl.SSLEOFError |
def _compile_builder(self, append_unknown=True):
defaults = self.defaults or {}
dom_ops = []
url_ops = []
opl = dom_ops
for is_dynamic, data in self._trace:
if data == "|" and opl is dom_ops:
opl = url_ops
continue
# this seems like a silly case to ever come ... | def _compile_builder(self, append_unknown=True):
defaults = self.defaults or {}
dom_ops = []
url_ops = []
opl = dom_ops
for is_dynamic, data in self._trace:
if data == "|" and opl is dom_ops:
opl = url_ops
continue
# this seems like a silly case to ever come ... | https://github.com/pallets/werkzeug/issues/1551 | flask run
* Serving Flask app "flask_test.py"
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
Traceback (most recent call last):
File "d:\tool\python\38\lib\runpy.py", line 192, in _run_module_as_main
retu... | TypeError |
def _compile_builder(self, append_unknown=True):
defaults = self.defaults or {}
dom_ops = []
url_ops = []
opl = dom_ops
for is_dynamic, data in self._trace:
if data == "|" and opl is dom_ops:
opl = url_ops
continue
# this seems like a silly case to ever come ... | def _compile_builder(self, append_unknown=True):
defaults = self.defaults or {}
dom_ops = []
url_ops = []
opl = dom_ops
for is_dynamic, data in self._trace:
if data == "|" and opl is dom_ops:
opl = url_ops
continue
# this seems like a silly case to ever come ... | https://github.com/pallets/werkzeug/issues/1544 | Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib64/python2.7/site-packages/werkzeug/routing.py", line 948
exec(code, globs, locs)
SyntaxError: unqualified exec is not allowed in function '_compile_builder' it contains a nested function with free variables | SyntaxError |
def __init__(self, data=None, secret_key=None, new=True):
ModificationTrackingDict.__init__(self, data or ())
# explicitly convert it into a bytestring because python 2.6
# no longer performs an implicit string conversion on hmac
if secret_key is not None:
secret_key = to_bytes(secret_key, "utf-... | def __init__(self, data=None, secret_key=None, new=True):
ModificationTrackingDict.__init__(self, data or ())
# explicitly convert it into a bytestring because python 2.6
# no longer performs an implicit string conversion on hmac
if secret_key is not None:
secret_key = to_bytes(secret_key, "utf-... | https://github.com/pallets/werkzeug/issues/953 | Traceback (most recent call last):
File "test_secure_cookie.py", line 10, in <module>
print(c.serialize())
File "/home/tonyo/reps/github/werkzeug/werkzeug/contrib/securecookie.py", line 224, in serialize
self.quote(value).decode('ascii')
File "/home/tonyo/reps/github/werkzeug/werkzeug/contrib/securecookie.py", line 183... | TypeError |
def quote(cls, value):
"""Quote the value for the cookie. This can be any object supported
by :attr:`serialization_method`.
:param value: the value to quote.
"""
if cls.serialization_method is not None:
value = cls.serialization_method.dumps(value)
if cls.quote_base64:
value = ... | def quote(cls, value):
"""Quote the value for the cookie. This can be any object supported
by :attr:`serialization_method`.
:param value: the value to quote.
"""
if cls.serialization_method is not None:
value = cls.serialization_method.dumps(value)
if cls.quote_base64:
value = ... | https://github.com/pallets/werkzeug/issues/953 | Traceback (most recent call last):
File "test_secure_cookie.py", line 10, in <module>
print(c.serialize())
File "/home/tonyo/reps/github/werkzeug/werkzeug/contrib/securecookie.py", line 224, in serialize
self.quote(value).decode('ascii')
File "/home/tonyo/reps/github/werkzeug/werkzeug/contrib/securecookie.py", line 183... | TypeError |
def add_arguments(self, parser):
self.instances = {}
if self.subcommands:
subparsers = parser.add_subparsers(dest=self.subcommand_dest)
for command, cls in self.subcommands.items():
instance = cls(self.stdout._out, self.stderr._out)
instance.style = self.style
... | def add_arguments(self, parser):
self.instances = {}
if self.subcommands:
subparsers = parser.add_subparsers(dest=self.subcommand_dest)
for command, cls in self.subcommands.items():
instance = cls(self.stdout, self.stderr)
instance.style = self.style
parser_s... | https://github.com/django-cms/django-cms/issues/5490 | Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/.../www/lib/python2.7/site-packages/django/core/management/__init__.py", line 354, in execute_from_command_line
utility.execute()
File "/.../www/lib/python2.7/site-packages/django/core/management/__init_... | UnicodeDecodeError |
def handle(self, *args, **options):
if options[self.subcommand_dest] in self.instances:
command = self.instances[options[self.subcommand_dest]]
if options.get("no_color"):
command.style = no_style()
command.stderr.style_func = None
if options.get("stdout"):
... | def handle(self, *args, **options):
if options[self.subcommand_dest] in self.instances:
command = self.instances[options[self.subcommand_dest]]
if options.get("no_color"):
command.style = no_style()
command.stderr.style_func = None
if options.get("stdout"):
... | https://github.com/django-cms/django-cms/issues/5490 | Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/.../www/lib/python2.7/site-packages/django/core/management/__init__.py", line 354, in execute_from_command_line
utility.execute()
File "/.../www/lib/python2.7/site-packages/django/core/management/__init_... | UnicodeDecodeError |
def handle_label(self, label, **options):
queryset = Page.objects.filter(application_urls=label)
number_of_apphooks = queryset.count()
if number_of_apphooks > 0:
if options.get("interactive"):
confirm = input(
"""
You have requested to remove %d '%s' apphooks.
Are you su... | def handle_label(self, label, **options):
queryset = Page.objects.filter(application_urls=label)
number_of_apphooks = queryset.count()
if number_of_apphooks > 0:
if options.get("interactive"):
confirm = input(
"""
You have requested to remove %d %r apphooks.
Are you sure... | https://github.com/django-cms/django-cms/issues/5490 | Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/.../www/lib/python2.7/site-packages/django/core/management/__init__.py", line 354, in execute_from_command_line
utility.execute()
File "/.../www/lib/python2.7/site-packages/django/core/management/__init_... | UnicodeDecodeError |
def handle_label(self, label, **options):
plugin_pool.get_all_plugins()
queryset = CMSPlugin.objects.filter(plugin_type=label)
number_of_plugins = queryset.count()
if number_of_plugins > 0:
if options.get("interactive"):
confirm = input(
"""
You have requested to rem... | def handle_label(self, label, **options):
plugin_pool.get_all_plugins()
queryset = CMSPlugin.objects.filter(plugin_type=label)
number_of_plugins = queryset.count()
if number_of_plugins > 0:
if options.get("interactive"):
confirm = input(
"""
You have requested to rem... | https://github.com/django-cms/django-cms/issues/5490 | Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/.../www/lib/python2.7/site-packages/django/core/management/__init__.py", line 354, in execute_from_command_line
utility.execute()
File "/.../www/lib/python2.7/site-packages/django/core/management/__init_... | UnicodeDecodeError |
def save_model(self, request, obj, form, change):
"""
Move the page in the tree if necessary and save every placeholder
Content object.
"""
target = request.GET.get("target", None)
position = request.GET.get("position", None)
if "recover" in request.path_info:
pk = obj.pk
if... | def save_model(self, request, obj, form, change):
"""
Move the page in the tree if necessary and save every placeholder
Content object.
"""
target = request.GET.get("target", None)
position = request.GET.get("position", None)
if "recover" in request.path_info:
pk = obj.pk
if... | https://github.com/django-cms/django-cms/issues/4102 | Traceback (most recent call last):
File "/home/user/.virtualenvs/myenv/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/user/.virtualenvs/myenv/local/lib/python2.7/site-packages/django/utils/dec... | AttributeError |
def save(self, no_signals=False, commit=True, **kwargs):
"""
Args:
commit: True if model should be really saved
"""
# delete template cache
if hasattr(self, "_template_cache"):
delattr(self, "_template_cache")
created = not bool(self.pk)
if self.reverse_id == "":
sel... | def save(self, no_signals=False, commit=True, **kwargs):
"""
Args:
commit: True if model should be really saved
"""
# delete template cache
if hasattr(self, "_template_cache"):
delattr(self, "_template_cache")
created = not bool(self.pk)
if self.reverse_id == "":
sel... | https://github.com/django-cms/django-cms/issues/4102 | Traceback (most recent call last):
File "/home/user/.virtualenvs/myenv/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/user/.virtualenvs/myenv/local/lib/python2.7/site-packages/django/utils/dec... | AttributeError |
def save(self, no_signals=False, commit=True, **kwargs):
"""
Args:
commit: True if model should be really saved
"""
# delete template cache
if hasattr(self, "_template_cache"):
delattr(self, "_template_cache")
created = not bool(self.pk)
if self.reverse_id == "":
sel... | def save(self, no_signals=False, commit=True, **kwargs):
"""
Args:
commit: True if model should be really saved
"""
# delete template cache
if hasattr(self, "_template_cache"):
delattr(self, "_template_cache")
created = not bool(self.pk)
if self.reverse_id == "":
sel... | https://github.com/django-cms/django-cms/issues/3938 | Internal Server Error: /admin/cms/page/add/
Traceback (most recent call last):
File "/home/flyweb/www/venv/lib/python3.4/site-packages/django/db/backends/utils.py", line 65, in execute
return self.cursor.execute(sql, params)
psycopg2.DataError: value too long for type character varying(70)
The above exception was the... | psycopg2.DataError |
def _show_placeholder_for_page(
context, placeholder_name, page_lookup, lang=None, site=None, cache_result=True
):
"""
Shows the content of a page with a placeholder name and given lookup
arguments in the given language.
This is useful if you want to have some more or less static content that is
... | def _show_placeholder_for_page(
context, placeholder_name, page_lookup, lang=None, site=None, cache_result=True
):
"""
Shows the content of a page with a placeholder name and given lookup
arguments in the given language.
This is useful if you want to have some more or less static content that is
... | https://github.com/django-cms/django-cms/issues/3843 | Traceback (most recent call last):
File "/path/to/env/lib/python2.6/site-packages/django/core/handlers/base.py", line 137, in get_response
response = response.render()
File "/path/to/env/lib/python2.6/site-packages/django/template/response.py", line 105, in render
self.content = self.rendered_content
File "/path/to/env... | TypeError |
def _onGCodeLayerMessage(self, message: Arcus.PythonMessage) -> None:
try:
self._scene.gcode_dict[self._start_slice_job_build_plate].append(
message.data.decode("utf-8", "replace")
) # type: ignore #Because we generate this attribute dynamically.
except KeyError: # Can occur if the... | def _onGCodeLayerMessage(self, message: Arcus.PythonMessage) -> None:
self._scene.gcode_dict[self._start_slice_job_build_plate].append(
message.data.decode("utf-8", "replace")
) # type: ignore #Because we generate this attribute dynamically.
| https://github.com/Ultimaker/Cura/issues/6245 | 2019-08-22 21:56:47,130 - CRITICAL - [MainThread] cura.CrashHandler.__init__ [61]: An uncaught error has occurred!
2019-08-22 21:56:47,133 - CRITICAL - [MainThread] cura.CrashHandler.__init__ [64]: Traceback (most recent call last):
2019-08-22 21:56:47,134 - CRITICAL - [MainThread] cura.CrashHandler.__init__ [64]: Fi... | KeyError |
def _onGCodePrefixMessage(self, message: Arcus.PythonMessage) -> None:
try:
self._scene.gcode_dict[self._start_slice_job_build_plate].insert(
0, message.data.decode("utf-8", "replace")
) # type: ignore #Because we generate this attribute dynamically.
except KeyError: # Can occur if... | def _onGCodePrefixMessage(self, message: Arcus.PythonMessage) -> None:
self._scene.gcode_dict[self._start_slice_job_build_plate].insert(
0, message.data.decode("utf-8", "replace")
) # type: ignore #Because we generate this attribute dynamically.
| https://github.com/Ultimaker/Cura/issues/6245 | 2019-08-22 21:56:47,130 - CRITICAL - [MainThread] cura.CrashHandler.__init__ [61]: An uncaught error has occurred!
2019-08-22 21:56:47,133 - CRITICAL - [MainThread] cura.CrashHandler.__init__ [64]: Traceback (most recent call last):
2019-08-22 21:56:47,134 - CRITICAL - [MainThread] cura.CrashHandler.__init__ [64]: Fi... | KeyError |
def _onActiveExtruderChanged(self):
new_active_stack = ExtruderManager.getInstance().getActiveExtruderStack()
if not new_active_stack:
self._active_container_stack = None
return
if new_active_stack != self._active_container_stack: # Check if changed
if (
self._active_co... | def _onActiveExtruderChanged(self):
new_active_stack = ExtruderManager.getInstance().getActiveExtruderStack()
# if not new_active_stack:
# new_active_stack = self._global_container_stack
if new_active_stack != self._active_container_stack: # Check if changed
if (
self._active_c... | https://github.com/Ultimaker/Cura/issues/3570 | Traceback (most recent call last):
File "/usr/bin/cura", line 141, in <module>
app.run()
File "/usr/lib/python3/dist-packages/cura/CuraApplication.py", line 686, in run
self._volume = BuildVolume.BuildVolume(root)
File "/usr/lib/python3/dist-packages/cura/BuildVolume.py", line 107, in __init__
Application.getInstance()... | ValueError |
def _settingIsOverwritingInheritance(
self, key: str, stack: ContainerStack = None
) -> bool:
has_setting_function = False
if not stack:
stack = self._active_container_stack
if not stack: # No active container stack yet!
return False
containers = []
## Check if the setting has ... | def _settingIsOverwritingInheritance(
self, key: str, stack: ContainerStack = None
) -> bool:
has_setting_function = False
if not stack:
stack = self._active_container_stack
containers = []
## Check if the setting has a user state. If not, it is never overwritten.
has_user_state = stack... | https://github.com/Ultimaker/Cura/issues/3570 | Traceback (most recent call last):
File "/usr/bin/cura", line 141, in <module>
app.run()
File "/usr/lib/python3/dist-packages/cura/CuraApplication.py", line 686, in run
self._volume = BuildVolume.BuildVolume(root)
File "/usr/lib/python3/dist-packages/cura/BuildVolume.py", line 107, in __init__
Application.getInstance()... | ValueError |
def fit(self, X, y):
"""Fit the model using X as training data and y as target values
Parameters
----------
X : sktime-format pandas dataframe with shape([n_cases,n_dimensions]),
or numpy ndarray with shape([n_cases,n_readings,n_dimensions])
y : {array-like, sparse matrix}
Target value... | def fit(self, X, y):
"""Fit the model using X as training data and y as target values
Parameters
----------
X : sktime-format pandas dataframe with shape([n_cases,n_dimensions]),
or numpy ndarray with shape([n_cases,n_readings,n_dimensions])
y : {array-like, sparse matrix}
Target value... | https://github.com/alan-turing-institute/sktime/issues/608 | ---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-25-a54f834dd466> in <module>
2
3 knn = KNeighborsTimeSeriesClassifier(n_neighbors=1, metric="dtw")
----> 4 knn.fit(X_train, y_train)
5 knn.score(X_test... | TypeError |
def fit(self, y, X=None, fh=None):
"""Fit to training data.
Parameters
----------
y : pd.Series
Target time series to which to fit the forecaster.
fh : int, list or np.array, optional (default=None)
The forecasters horizon with the steps ahead to to predict.
X : pd.DataFrame, op... | def fit(self, y, X=None, fh=None):
"""Fit to training data.
Parameters
----------
y : pd.Series
Target time series to which to fit the forecaster.
fh : int, list or np.array, optional (default=None)
The forecasters horizon with the steps ahead to to predict.
X : pd.DataFrame, op... | https://github.com/alan-turing-institute/sktime/issues/540 | ValueError Traceback (most recent call last)
<ipython-input-3-4a75cca05732> in <module>
16 MODEL_Auto_ARIMA.fit(
17 y_train=y_df["y"],
---> 18 X_train=X_df
19 )
~/miniconda3/envs/RATP37/lib/python3.7/site-packages/sktime/forecasting/arima.py in fit(self, y_train, fh, X_train, **f... | ValueError |
def _transform(self, y, X=None):
"""Transform data using rolling window approach"""
if X is not None:
raise NotImplementedError()
y = check_y(y)
# get integer time index
cv = self._cv
# Transform target series into tabular format using
# rolling window tabularisation
x_windows ... | def _transform(self, y_train, X_train=None):
"""Transform data using rolling window approach"""
if X_train is not None:
raise NotImplementedError()
y_train = check_y(y_train)
# get integer time index
cv = self._cv
# Transform target series into tabular format using
# rolling window... | https://github.com/alan-turing-institute/sktime/issues/540 | ValueError Traceback (most recent call last)
<ipython-input-3-4a75cca05732> in <module>
16 MODEL_Auto_ARIMA.fit(
17 y_train=y_df["y"],
---> 18 X_train=X_df
19 )
~/miniconda3/envs/RATP37/lib/python3.7/site-packages/sktime/forecasting/arima.py in fit(self, y_train, fh, X_train, **f... | ValueError |
def fit(self, y, X=None, fh=None):
"""Fit to training data.
Parameters
----------
y : pd.Series
Target time series to which to fit the forecaster.
fh : int, list or np.array, optional (default=None)
The forecasters horizon with the steps ahead to to predict.
X : pd.DataFrame, op... | def fit(self, y, X=None, fh=None):
"""Fit to training data.
Parameters
----------
y : pd.Series
Target time series to which to fit the forecaster.
fh : int, list or np.array, optional (default=None)
The forecasters horizon with the steps ahead to to predict.
X : pd.DataFrame, op... | https://github.com/alan-turing-institute/sktime/issues/540 | ValueError Traceback (most recent call last)
<ipython-input-3-4a75cca05732> in <module>
16 MODEL_Auto_ARIMA.fit(
17 y_train=y_df["y"],
---> 18 X_train=X_df
19 )
~/miniconda3/envs/RATP37/lib/python3.7/site-packages/sktime/forecasting/arima.py in fit(self, y_train, fh, X_train, **f... | ValueError |
def fit(self, y, X=None, fh=None, **fit_params):
"""Fit to training data.
Parameters
----------
y : pd.Series
Target time series to which to fit the forecaster.
fh : int, list or np.array, optional (default=None)
The forecasters horizon with the steps ahead to to predict.
X : pd... | def fit(self, y, X=None, fh=None, **fit_params):
"""Fit to training data.
Parameters
----------
y : pd.Series
Target time series to which to fit the forecaster.
fh : int, list or np.array, optional (default=None)
The forecasters horizon with the steps ahead to to predict.
X : pd... | https://github.com/alan-turing-institute/sktime/issues/540 | ValueError Traceback (most recent call last)
<ipython-input-3-4a75cca05732> in <module>
16 MODEL_Auto_ARIMA.fit(
17 y_train=y_df["y"],
---> 18 X_train=X_df
19 )
~/miniconda3/envs/RATP37/lib/python3.7/site-packages/sktime/forecasting/arima.py in fit(self, y_train, fh, X_train, **f... | ValueError |
def fit(self, y, X=None, fh=None):
"""Fit to training data.
Parameters
----------
y : pd.Series
Target time series to which to fit the forecaster.
fh : int, list or np.array, optional (default=None)
The forecasters horizon with the steps ahead to to predict.
X : pd.DataFrame, op... | def fit(self, y, X=None, fh=None):
"""Fit to training data.
Parameters
----------
y : pd.Series
Target time series to which to fit the forecaster.
fh : int, list or np.array, optional (default=None)
The forecasters horizon with the steps ahead to to predict.
X : pd.DataFrame, op... | https://github.com/alan-turing-institute/sktime/issues/540 | ValueError Traceback (most recent call last)
<ipython-input-3-4a75cca05732> in <module>
16 MODEL_Auto_ARIMA.fit(
17 y_train=y_df["y"],
---> 18 X_train=X_df
19 )
~/miniconda3/envs/RATP37/lib/python3.7/site-packages/sktime/forecasting/arima.py in fit(self, y_train, fh, X_train, **f... | ValueError |
def fit(self, y, X=None, fh=None):
"""Fit to training data.
Parameters
----------
y : pd.Series
Target time series with which to fit the forecaster.
fh : int, list or np.array, optional (default=None)
The forecast horizon with the steps ahead to predict.
X : pd.DataFrame, option... | def fit(self, y, X=None, fh=None):
"""Fit to training data.
Parameters
----------
y : pd.Series
Target time series with which to fit the forecaster.
fh : int, list or np.array, optional (default=None)
The forecast horizon with the steps ahead to predict.
X : pd.DataFrame, option... | https://github.com/alan-turing-institute/sktime/issues/540 | ValueError Traceback (most recent call last)
<ipython-input-3-4a75cca05732> in <module>
16 MODEL_Auto_ARIMA.fit(
17 y_train=y_df["y"],
---> 18 X_train=X_df
19 )
~/miniconda3/envs/RATP37/lib/python3.7/site-packages/sktime/forecasting/arima.py in fit(self, y_train, fh, X_train, **f... | ValueError |
def fit(self, Z, X=None):
"""Fit to data.
Parameters
----------
Z : pd.Series
X : pd.DataFrame
Returns
-------
self : an instance of self
"""
z = check_series(Z, enforce_univariate=True)
self._set_y_index(z)
sp = check_sp(self.sp)
# apply seasonal decomposition
... | def fit(self, Z, X=None):
"""Fit to data.
Parameters
----------
y : pd.Series
X : pd.DataFrame
fit_params : dict
Returns
-------
self : an instance of self
"""
z = check_series(Z, enforce_univariate=True)
self._set_y_index(z)
sp = check_sp(self.sp)
# apply seas... | https://github.com/alan-turing-institute/sktime/issues/540 | ValueError Traceback (most recent call last)
<ipython-input-3-4a75cca05732> in <module>
16 MODEL_Auto_ARIMA.fit(
17 y_train=y_df["y"],
---> 18 X_train=X_df
19 )
~/miniconda3/envs/RATP37/lib/python3.7/site-packages/sktime/forecasting/arima.py in fit(self, y_train, fh, X_train, **f... | ValueError |
def check_y_X(y, X=None, allow_empty=False, allow_constant=True):
"""Validate input data.
Parameters
----------
y : pd.Series
X : pd.DataFrame, optional (default=None)
allow_empty : bool, optional (default=False)
If True, empty `y` does not raise an error.
allow_constant : bool, opt... | def check_y_X(y, X=None, allow_empty=False, allow_constant=True, warn_X=False):
"""Validate input data.
Parameters
----------
y : pd.Series
X : pd.DataFrame, optional (default=None)
allow_empty : bool, optional (default=False)
If True, empty `y` does not raise an error.
allow_consta... | https://github.com/alan-turing-institute/sktime/issues/540 | ValueError Traceback (most recent call last)
<ipython-input-3-4a75cca05732> in <module>
16 MODEL_Auto_ARIMA.fit(
17 y_train=y_df["y"],
---> 18 X_train=X_df
19 )
~/miniconda3/envs/RATP37/lib/python3.7/site-packages/sktime/forecasting/arima.py in fit(self, y_train, fh, X_train, **f... | ValueError |
def check_X(X, allow_empty=False, enforce_univariate=False):
"""Validate input data.
Parameters
----------
X : pd.Series, pd.DataFrame, np.ndarray
allow_empty : bool, optional (default=False)
If True, empty `y` raises an error.
enforce_univariate : bool, optional (default=False)
... | def check_X(X, allow_empty=False, enforce_univariate=False, warn_X=False):
"""Validate input data.
Parameters
----------
X : pd.Series, pd.DataFrame, np.ndarray
allow_empty : bool, optional (default=False)
If True, empty `y` raises an error.
Returns
-------
y : pd.Series, pd.Da... | https://github.com/alan-turing-institute/sktime/issues/540 | ValueError Traceback (most recent call last)
<ipython-input-3-4a75cca05732> in <module>
16 MODEL_Auto_ARIMA.fit(
17 y_train=y_df["y"],
---> 18 X_train=X_df
19 )
~/miniconda3/envs/RATP37/lib/python3.7/site-packages/sktime/forecasting/arima.py in fit(self, y_train, fh, X_train, **f... | ValueError |
def __init__(
self,
error="add",
trend=None,
damped=False,
seasonal=None,
sp=1,
initialization_method="estimated",
initial_level=None,
initial_trend=None,
initial_seasonal=None,
bounds=None,
dates=None,
freq=None,
missing="none",
start_params=None,
maxiter... | def __init__(
self,
error="add",
trend=None,
damped=False,
seasonal=None,
sp=None,
initialization_method="estimated",
initial_level=None,
initial_trend=None,
initial_seasonal=None,
bounds=None,
dates=None,
freq=None,
missing="none",
start_params=None,
maxi... | https://github.com/alan-turing-institute/sktime/issues/435 | ---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-80-03aaf6ca0732> in <module>
----> 1 hw_auto_model.fit(y_train)
~/miniconda3/lib/python3.7/site-packages/sktime/forecasting/base/_statsmodels.py in fit(... | AttributeError |
def _fit_forecaster(self, y, X=None):
# Select model automatically
if self.auto:
# Initialise parameter ranges
error_range = ["add", "mul"]
if self.allow_multiplicative_trend:
trend_range = ["add", "mul", None]
else:
trend_range = ["add", None]
if ... | def _fit_forecaster(self, y, X=None):
# Select model automatically
if self.auto:
# Initialise parameter ranges
error_range = ["add", "mul"]
if self.allow_multiplicative_trend:
trend_range = ["add", "mul", None]
else:
trend_range = ["add", None]
sea... | https://github.com/alan-turing-institute/sktime/issues/435 | ---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-80-03aaf6ca0732> in <module>
----> 1 hw_auto_model.fit(y_train)
~/miniconda3/lib/python3.7/site-packages/sktime/forecasting/base/_statsmodels.py in fit(... | AttributeError |
def predict_proba(self, X):
"""Predict class probabilities for X.
The predicted class probabilities of an input sample are computed as
the mean predicted class probabilities of the trees in the forest. The
class probability of a single tree is the fraction of samples of the same
class in a leaf.
... | def predict_proba(self, X):
"""Predict class probabilities for X.
The predicted class probabilities of an input sample are computed as
the mean predicted class probabilities of the trees in the forest. The
class probability of a single tree is the fraction of samples of the same
class in a leaf.
... | https://github.com/alan-turing-institute/sktime/issues/86 | ---------------------------------------------------------------------------
AxisError Traceback (most recent call last)
<ipython-input-56-a8b067ca3dcd> in <module>
----> 1 clf.predict(X_test.iloc[0:1, :])
~/.conda/envs/py3/lib/python3.7/site-packages/sklearn/utils/metaestimators.py in <... | AxisError |
def build(self, parent_step=None, force_sequence=None):
"""Build a factory instance."""
# TODO: Handle "batch build" natively
pre, post = parse_declarations(
self.extras,
base_pre=self.factory_meta.pre_declarations,
base_post=self.factory_meta.post_declarations,
)
if force_s... | def build(self, parent_step=None, force_sequence=None):
"""Build a factory instance."""
# TODO: Handle "batch build" natively
pre, post = parse_declarations(
self.extras,
base_pre=self.factory_meta.pre_declarations,
base_post=self.factory_meta.post_declarations,
)
if force_s... | https://github.com/FactoryBoy/factory_boy/issues/466 | Traceback (most recent call last):
File "/root/docs/notes/gist/factoryboy_maybe_broke_postgen.py", line 55, in <module>
value = CopyTargetFactory()
File "/root/.pyenv/versions/frontend/lib/python2.7/site-packages/factory/base.py", line 46, in __call__
return cls.create(**kwargs)
File "/root/.pyenv/versions/frontend/lib... | TypeError |
def __getattr__(self, name):
"""Retrieve an attribute's value.
This will compute it if needed, unless it is already on the list of
attributes being computed.
"""
if name in self.__pending:
raise errors.CyclicDefinitionError(
"Cyclic lazy attribute definition for %r; cycle found ... | def __getattr__(self, name):
"""Retrieve an attribute's value.
This will compute it if needed, unless it is already on the list of
attributes being computed.
"""
if name in self.__pending:
raise errors.CyclicDefinitionError(
"Cyclic lazy attribute definition for %r; cycle found ... | https://github.com/FactoryBoy/factory_boy/issues/466 | Traceback (most recent call last):
File "/root/docs/notes/gist/factoryboy_maybe_broke_postgen.py", line 55, in <module>
value = CopyTargetFactory()
File "/root/.pyenv/versions/frontend/lib/python2.7/site-packages/factory/base.py", line 46, in __call__
return cls.create(**kwargs)
File "/root/.pyenv/versions/frontend/lib... | TypeError |
def get_version(package_name):
version_re = re.compile(r"^__version__ = [\"']([\w_.-]+)[\"']$")
package_components = package_name.split(".")
init_path = os.path.join(root_dir, *(package_components + ["__init__.py"]))
with codecs.open(init_path, "r", "utf-8") as f:
for line in f:
matc... | def get_version(package_name):
version_re = re.compile(r"^__version__ = [\"']([\w_.-]+)[\"']$")
package_components = package_name.split(".")
path_components = package_components + ["__init__.py"]
with open(os.path.join(root_dir, *path_components)) as f:
for line in f:
match = version... | https://github.com/FactoryBoy/factory_boy/issues/118 | (.env)# pip install factory_boy
Downloading/unpacking factory-boy
Downloading factory_boy-2.2.1.tar.gz (71kB): 71kB downloaded
Running setup.py egg_info for package factory-boy
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "/home/cdp/.env/lib/python3.3/encodings/ascii.py", line 26, in de... | UnicodeDecodeError |
def __init__(self, **kwargs):
super().__init__(**kwargs)
# add events for each field
self._events.source = self
self._events.add(**dict.fromkeys(self.__fields__))
| def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
# add events for each field
self._events.source = self
self._events.add(**dict.fromkeys(self.__fields__))
| https://github.com/napari/napari/issues/2264 | In [1]: from pydantic import BaseModel
In [2]: import inspect
In [3]: class T(BaseModel):
...: x: int
...: y: str = 'sadf'
...:
# so far so good
In [4]: inspect.signature(T)
Out[4]: <Signature (*, x: int, y: str = 'sadf') -> None>
In [5]: import PySide2
In [6]: inspect.signature(T)
Out[6]: <Signature (**da... | TypeError |
def __new__(mcs, name, bases, namespace, **kwargs):
with no_class_attributes():
cls = super().__new__(mcs, name, bases, namespace, **kwargs)
cls.__eq_operators__ = {
n: pick_equality_operator(f.type_) for n, f in cls.__fields__.items()
}
return cls
| def __new__(mcs, name, bases, namespace, **kwargs):
cls = super().__new__(mcs, name, bases, namespace, **kwargs)
cls.__eq_operators__ = {
n: pick_equality_operator(f.type_) for n, f in cls.__fields__.items()
}
return cls
| https://github.com/napari/napari/issues/2264 | In [1]: from pydantic import BaseModel
In [2]: import inspect
In [3]: class T(BaseModel):
...: x: int
...: y: str = 'sadf'
...:
# so far so good
In [4]: inspect.signature(T)
Out[4]: <Signature (*, x: int, y: str = 'sadf') -> None>
In [5]: import PySide2
In [6]: inspect.signature(T)
Out[6]: <Signature (**da... | TypeError |
def bundle():
clean()
if MACOS:
patch_dmgbuild()
# smoke test, and build resources
subprocess.check_call([sys.executable, "-m", APP, "--info"])
with patched_toml():
# create
cmd = ["briefcase", "create"] + (["--no-docker"] if LINUX else [])
subprocess.check_call(cm... | def bundle():
clean()
if MACOS:
patch_dmgbuild()
# smoke test, and build resources
subprocess.check_call([sys.executable, "-m", APP, "--info"])
patch_toml()
# create
cmd = ["briefcase", "create"] + (["--no-docker"] if LINUX else [])
subprocess.check_call(cmd)
time.sleep(0... | https://github.com/napari/napari/issues/2022 | C:\Users\rober>C:\Users\rober\AppData\Local\Programs\napari\python\python.exe -m napari
** On entry to DGEBAL parameter number 3 had an illegal value
** On entry to DGEHRD parameter number 2 had an illegal value
** On entry to DORGHR DORGQR parameter number 2 had an illegal value
** On entry to DHSEQR parameter num... | RuntimeError |
def _find_rcc_or_raise() -> str:
"""Locate the Qt rcc binary to generate resource files
1. we always want to use pyrcc5 if it's available, regardless of API
2. it will sometimes, (if not always) be named pyrcc5.bat on windows...
but shutil.which() will find that too
3. We also want to prefer bin... | def _find_rcc_or_raise() -> str:
"""Locate the Qt rcc binary to generate resource files
1. we always want to use pyrcc5 if it's available, regardless of API
2. it will sometimes, (if not always) be named pyrcc5.bat on windows...
but shutil.which() will find that too
3. We also want to prefer bin... | https://github.com/napari/napari/issues/2022 | C:\Users\rober>C:\Users\rober\AppData\Local\Programs\napari\python\python.exe -m napari
** On entry to DGEBAL parameter number 3 had an illegal value
** On entry to DGEHRD parameter number 2 had an illegal value
** On entry to DORGHR DORGQR parameter number 2 had an illegal value
** On entry to DHSEQR parameter num... | RuntimeError |
def split_channels(
data: np.ndarray,
channel_axis: int,
**kwargs,
) -> List[FullLayerData]:
"""Split the data array into separate arrays along an axis.
Keyword arguments will override any parameters altered or set in this
function. Colormap, blending, or multiscale are set as follows if not
... | def split_channels(
data: np.ndarray,
channel_axis: int,
**kwargs,
) -> List[FullLayerData]:
"""Split the data array into separate arrays along an axis.
Keyword arguments will override any parameters altered or set in this
function. Colormap, blending, or multiscale are set as follows if not
... | https://github.com/napari/napari/issues/2024 | ERROR:root:Unhandled exception:
Traceback (most recent call last):
File "C:\miniconda3\envs\bc\lib\site-packages\napari\_qt\event_loop.py", line 79, in gui_qt
yield app
File "<ipython-input-185-65466d9eb63b>", line 15, in <module>
viewer.add_image(
File "C:\miniconda3\envs\bc\lib\site-packages\napari\components\viewer_... | IndexError |
def ensure_sequence_of_iterables(obj, length: Optional[int] = None):
"""Ensure that ``obj`` behaves like a (nested) sequence of iterables.
If length is provided and the object is already a sequence of iterables,
a ValueError will be raised if ``len(obj) != length``.
Parameters
----------
obj :... | def ensure_sequence_of_iterables(obj, length: Optional[int] = None):
"""Ensure that ``obj`` behaves like a (nested) sequence of iterables.
If length is provided and the object is already a sequence of iterables,
a ValueError will be raised if ``len(obj) != length``.
Parameters
----------
obj :... | https://github.com/napari/napari/issues/2024 | ERROR:root:Unhandled exception:
Traceback (most recent call last):
File "C:\miniconda3\envs\bc\lib\site-packages\napari\_qt\event_loop.py", line 79, in gui_qt
yield app
File "<ipython-input-185-65466d9eb63b>", line 15, in <module>
viewer.add_image(
File "C:\miniconda3\envs\bc\lib\site-packages\napari\components\viewer_... | IndexError |
def data(self, data: Union[list, np.ndarray]):
"""set the vertex data and build the vispy arrays for display"""
# convert data to a numpy array if it is not already one
data = np.asarray(data)
# Sort data by ID then time
self._order = np.lexsort((data[:, 1], data[:, 0]))
data = data[self._orde... | def data(self, data: Union[list, np.ndarray]):
"""set the vertex data and build the vispy arrays for display"""
# convert data to a numpy array if it is not already one
data = np.asarray(data)
# Sort data by ID then time
self._order = np.lexsort((data[:, 1], data[:, 0]))
data = data[self._orde... | https://github.com/napari/napari/issues/1943 | ERROR:root:Unhandled exception:
Traceback (most recent call last):
File "/home/kapoorlab/anaconda3/envs/tensorflowGPU/lib/python3.8/site-packages/napari/_qt/event_loop.py", line 79, in gui_qt
yield app
File "<ipython-input-2-498e4844dd1f>", line 9, in <module>
Tracks = napari.view_tracks(tracks_data,name='tracks')
File... | ValueError |
def track_labels(self, current_time: int) -> tuple:
"""return track labels at the current time"""
# this is the slice into the time ordered points array
if current_time not in self._points_lookup:
return [], []
lookup = self._points_lookup[current_time]
pos = self._points[lookup, ...]
l... | def track_labels(self, current_time: int) -> tuple:
"""return track labels at the current time"""
# this is the slice into the time ordered points array
lookup = self._points_lookup[current_time]
pos = self._points[lookup, ...]
lbl = [f"ID:{i}" for i in self._points_id[lookup]]
return lbl, pos
| https://github.com/napari/napari/issues/1943 | ERROR:root:Unhandled exception:
Traceback (most recent call last):
File "/home/kapoorlab/anaconda3/envs/tensorflowGPU/lib/python3.8/site-packages/napari/_qt/event_loop.py", line 79, in gui_qt
yield app
File "<ipython-input-2-498e4844dd1f>", line 9, in <module>
Tracks = napari.view_tracks(tracks_data,name='tracks')
File... | ValueError |
def track_labels(self) -> tuple:
"""return track labels at the current time"""
labels, positions = self._manager.track_labels(self.current_time)
# if there are no labels, return empty for vispy
if not labels:
return None, (None, None)
padded_positions = self._pad_display_data(positions)
... | def track_labels(self) -> tuple:
"""return track labels at the current time"""
# check that current time is still within the frame map
if self.current_time < 0 or self.current_time > self._manager.max_time:
# need to return a tuple for pos to clear the vispy text visual
return None, (None, ... | https://github.com/napari/napari/issues/1943 | ERROR:root:Unhandled exception:
Traceback (most recent call last):
File "/home/kapoorlab/anaconda3/envs/tensorflowGPU/lib/python3.8/site-packages/napari/_qt/event_loop.py", line 79, in gui_qt
yield app
File "<ipython-input-2-498e4844dd1f>", line 9, in <module>
Tracks = napari.view_tracks(tracks_data,name='tracks')
File... | ValueError |
def patch_dmgbuild():
if not MACOS:
return
from dmgbuild import core
# will not be required after dmgbuild > v1.3.3
# see https://github.com/al45tair/dmgbuild/pull/18
with open(core.__file__, "r") as f:
src = f.read()
if (
"max(total_size / 1024" not in src
and "... | def patch_dmgbuild():
if not MACOS:
return
from dmgbuild import core
# will not be required after dmgbuild > v1.3.3
# see https://github.com/al45tair/dmgbuild/pull/18
with open(core.__file__, "r") as f:
src = f.read()
if "max(total_size / 1024" not in src:
return
wit... | https://github.com/napari/napari/issues/1611 | 2020-09-03T02:35:23.0596607Z ##[section]Starting: Request a runner to run this job
2020-09-03T02:35:24.3040765Z Can't find any online and idle self-hosted runner in current repository that matches the required labels: 'macos-latest'
2020-09-03T02:35:24.3040846Z Can't find any online and idle self-hosted runner in curre... | DMGError |
def patch_dmgbuild():
if not MACOS:
return
from dmgbuild import core
# will not be required after dmgbuild > v1.3.3
# see https://github.com/al45tair/dmgbuild/pull/18
with open(core.__file__, "r") as f:
src = f.read()
with open(core.__file__, "w") as f:
f.write(
... | def patch_dmgbuild():
if not MACOS:
return
from dmgbuild import core
# will not be required after dmgbuild > v1.3.3
# see https://github.com/al45tair/dmgbuild/pull/18
with open(core.__file__, "r") as f:
src = f.read()
if (
"max(total_size / 1024" not in src
and "... | https://github.com/napari/napari/issues/1611 | 2020-09-03T02:35:23.0596607Z ##[section]Starting: Request a runner to run this job
2020-09-03T02:35:24.3040765Z Can't find any online and idle self-hosted runner in current repository that matches the required labels: 'macos-latest'
2020-09-03T02:35:24.3040846Z Can't find any online and idle self-hosted runner in curre... | DMGError |
def _on_data_change(self, event=None):
"""update the display"""
# update the shaders
self.track_shader.current_time = self.layer.current_time
self.graph_shader.current_time = self.layer.current_time
# add text labels if they're visible
if self.node._subvisuals[1].visible:
labels_text, ... | def _on_data_change(self, event=None):
"""update the display"""
# update the shaders
self.track_shader.current_time = self.layer.current_time
self.graph_shader.current_time = self.layer.current_time
# add text labels if they're visible
if self.node._subvisuals[1].visible:
labels_text, ... | https://github.com/napari/napari/issues/1745 | ---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-10-05f52b983105> in <module>
1 v = napari.Viewer()
----> 2 v.add_tracks(tracks, name='ilastik tracks')
<string> in add_tracks(self, data, properties, gr... | AttributeError |
def _on_tracks_change(self, event=None):
"""update the shader when the track data changes"""
self.track_shader.use_fade = self.layer.use_fade
self.track_shader.tail_length = self.layer.tail_length
self.track_shader.vertex_time = self.layer.track_times
# change the data to the vispy line visual
... | def _on_tracks_change(self, event=None):
"""update the shader when the track data changes"""
self.track_shader.use_fade = self.layer.use_fade
self.track_shader.tail_length = self.layer.tail_length
self.track_shader.vertex_time = self.layer.track_times
# change the data to the vispy line visual
... | https://github.com/napari/napari/issues/1745 | ---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-10-05f52b983105> in <module>
1 v = napari.Viewer()
----> 2 v.add_tracks(tracks, name='ilastik tracks')
<string> in add_tracks(self, data, properties, gr... | AttributeError |
def _on_graph_change(self, event=None):
"""update the shader when the graph data changes"""
self.graph_shader.use_fade = self.layer.use_fade
self.graph_shader.tail_length = self.layer.tail_length
self.graph_shader.vertex_time = self.layer.graph_times
# if the user clears a graph after it has been ... | def _on_graph_change(self, event=None):
"""update the shader when the graph data changes"""
self.graph_shader.use_fade = self.layer.use_fade
self.graph_shader.tail_length = self.layer.tail_length
self.graph_shader.vertex_time = self.layer.graph_times
# if the user clears a graph after it has been ... | https://github.com/napari/napari/issues/1745 | ---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-10-05f52b983105> in <module>
1 v = napari.Viewer()
----> 2 v.add_tracks(tracks, name='ilastik tracks')
<string> in add_tracks(self, data, properties, gr... | AttributeError |
def __init__(
self,
data,
*,
properties=None,
graph=None,
tail_width=2,
tail_length=30,
name=None,
metadata=None,
scale=None,
translate=None,
rotate=None,
shear=None,
affine=None,
opacity=1,
blending="additive",
visible=True,
colormap="turbo",
... | def __init__(
self,
data,
*,
properties=None,
graph=None,
tail_width=2,
tail_length=30,
name=None,
metadata=None,
scale=None,
translate=None,
opacity=1,
blending="additive",
visible=True,
colormap="turbo",
color_by="track_id",
colormaps_dict=None,
):
... | https://github.com/napari/napari/issues/1745 | ---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-10-05f52b983105> in <module>
1 v = napari.Viewer()
----> 2 v.add_tracks(tracks, name='ilastik tracks')
<string> in add_tracks(self, data, properties, gr... | AttributeError |
def _get_state(self):
"""Get dictionary of layer state.
Returns
-------
state : dict
Dictionary of layer state.
"""
state = self._get_base_state()
state.update(
{
"data": self.data,
"properties": self.properties,
"graph": self.graph,
... | def _get_state(self):
"""Get dictionary of layer state.
Returns
-------
state : dict
Dictionary of layer state.
"""
state = self._get_base_state()
state.update(
{
"data": self.data,
"properties": self.properties,
"graph": self.graph,
... | https://github.com/napari/napari/issues/1745 | ---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-10-05f52b983105> in <module>
1 v = napari.Viewer()
----> 2 v.add_tracks(tracks, name='ilastik tracks')
<string> in add_tracks(self, data, properties, gr... | AttributeError |
def _update_draw(self, scale_factors, corner_pixels, shape_threshold):
"""Update canvas scale and corner values on draw.
For layer multiscale determing if a new resolution level or tile is
required.
Parameters
----------
scale_factors : list
Scale factors going from canvas to world coo... | def _update_draw(self, scale_factors, corner_pixels, shape_threshold):
"""Update canvas scale and corner values on draw.
For layer multiscale determing if a new resolution level or tile is
required.
Parameters
----------
scale_factors : list
Scale factors going from canvas to world coo... | https://github.com/napari/napari/issues/1717 | Traceback (most recent call last):
File "/home/jni/miniconda3/envs/all/lib/python3.8/site-packages/vispy/app/backends/_qt.py", line 825, in paintGL
self._vispy_canvas.events.draw(region=None)
File "/home/jni/miniconda3/envs/all/lib/python3.8/site-packages/vispy/util/event.py", line 455, in __call__
self._invoke_callbac... | ValueError |
def __init__(
self,
data,
*,
properties=None,
graph=None,
tail_width=2,
tail_length=30,
name=None,
metadata=None,
scale=None,
translate=None,
opacity=1,
blending="additive",
visible=True,
colormap="turbo",
color_by="track_id",
colormaps_dict=None,
):
... | def __init__(
self,
data,
*,
properties=None,
graph=None,
tail_width=2,
tail_length=30,
name=None,
metadata=None,
scale=None,
translate=None,
opacity=1,
blending="additive",
visible=True,
colormap="turbo",
color_by="track_id",
colormaps_dict=None,
):
... | https://github.com/napari/napari/issues/1706 | Traceback (most recent call last):
File "/home/quantumjot/napari/napari/_qt/event_loop.py", line 79, in gui_qt
yield app
File "<ipython-input-15-fdca00748db9>", line 4, in <module>
viewer.add_tracks(data, properties=properties)
File "/home/quantumjot/napari/napari/components/add_layers_mixin.py", line 854, in add_track... | ValueError |
def configure_dask(data) -> Callable[[], ContextManager[dict]]:
"""Spin up cache and return context manager that optimizes Dask indexing.
This function determines whether data is a dask array or list of dask
arrays and prepares some optimizations if so.
When a delayed dask array is given to napari, th... | def configure_dask(data) -> Callable[[], ContextManager[dict]]:
"""Spin up cache and return context manager that optimizes Dask indexing.
This function determines whether data is a dask array or list of dask
arrays and prepares some optimizations if so.
When a delayed dask array is given to napari, th... | https://github.com/napari/napari/issues/1670 | ~/miniconda/lib/python3.8/site-packages/napari/utils/dask_utils.py in configure_dask(data)
168 if _is_dask_data(data):
169 create_dask_cache() # creates one if it doesn't exist
--> 170 dask_version = tuple(map(int, dask.__version__.split(".")))
171 if dask_version < (2, 15, 0):
172 ... | ValueError |
def mouseMoveEvent(self, event):
"""Drag and drop layer with mouse movement.
Parameters
----------
event : qtpy.QtCore.QEvent
Event from the Qt context.
"""
position = np.array([event.pos().x(), event.pos().y()])
distance = np.linalg.norm(position - self._drag_start_position)
if... | def mouseMoveEvent(self, event):
"""Drag and drop layer with mouse movement.
Parameters
----------
event : qtpy.QtCore.QEvent
Event from the Qt context.
"""
position = np.array([event.pos().x(), event.pos().y()])
distance = np.linalg.norm(position - self._drag_start_position)
if... | https://github.com/napari/napari/issues/1484 | Traceback (most recent call last):
File "c:\users\hectormz\code\contribute\napari\napari\_qt\qt_layerlist.py", line 307, in mouseMoveEvent
index = self.layers.index(self._drag_name)
File "c:\users\hectormz\code\contribute\napari\napari\utils\list\_typed.py", line 82, in index
raise KeyError(f'could not find element {q}... | KeyError |
def __init__(self, title="napari", ndisplay=2, order=None, axis_labels=None):
super().__init__()
self.events = EmitterGroup(
source=self,
auto_connect=True,
status=Event,
help=Event,
title=Event,
interactive=Event,
cursor=Event,
reset_view=Event,
... | def __init__(self, title="napari", ndisplay=2, order=None, axis_labels=None):
super().__init__()
self.events = EmitterGroup(
source=self,
auto_connect=True,
status=Event,
help=Event,
title=Event,
interactive=Event,
cursor=Event,
reset_view=Event,
... | https://github.com/napari/napari/issues/1323 | Traceback (most recent call last):
File "/Users/cjw/Code/napari/napari/_qt/qt_viewer_buttons.py", line 148, in <lambda>
self.clicked.connect(lambda: self.viewer.layers.remove_selected())
File "/Users/cjw/Code/napari/napari/components/layerlist.py", line 139, in remove_selected
self.pop(i)
File "/Users/cjw/Code/napari/n... | IndexError |
def select(layer, event):
"""Select shapes or vertices either in select or direct select mode.
Once selected shapes can be moved or resized, and vertices can be moved
depending on the mode. Holding shift when resizing a shape will preserve
the aspect ratio.
"""
shift = "Shift" in event.modifier... | def select(layer, event):
"""Select shapes or vertices either in select or direct select mode.
Once selected shapes can be moved or resized, and vertices can be moved
depending on the mode. Holding shift when resizing a shape will preserve
the aspect ratio.
"""
shift = "Shift" in event.modifier... | https://github.com/napari/napari/issues/1285 | Traceback (most recent call last):
File "/Users/yamauc0000/Documents/napari/.venv/lib/python3.7/site-packages/vispy/app/backends/_qt.py", line 447, in mousePressEvent
modifiers=self._modifiers(ev),
File "/Users/yamauc0000/Documents/napari/.venv/lib/python3.7/site-packages/vispy/app/base.py", line 181, in _vispy_mouse_p... | AttributeError |
def create_worker(
func: Callable,
*args,
_start_thread: Optional[bool] = None,
_connect: Optional[Dict[str, Union[Callable, Sequence[Callable]]]] = None,
_worker_class: Optional[Type[WorkerBase]] = None,
_ignore_errors: bool = False,
**kwargs,
) -> WorkerBase:
"""Convenience function to... | def create_worker(
func: Callable,
*args,
_start_thread: Optional[bool] = None,
_connect: Optional[Dict[str, Union[Callable, Sequence[Callable]]]] = None,
_worker_class: Optional[Type[WorkerBase]] = None,
_ignore_errors: bool = False,
**kwargs,
) -> WorkerBase:
"""Convenience function to... | https://github.com/napari/napari/issues/1292 | -------------------------------------------------------------------------
UnboundLocalError Traceback (most recent call last)
<ipython-input-23-1749d5f75cac> in <module>
52
53 viewer.window.add_dock_widget(loss_canvas)
---> 54 worker = train(model, data_loader, 500)
~/projects/napari/napari/_qt/t... | UnboundLocalError |
def add_image(
self,
data=None,
*,
channel_axis=None,
rgb=None,
colormap=None,
contrast_limits=None,
gamma=1,
interpolation="nearest",
rendering="mip",
iso_threshold=0.5,
attenuation=0.5,
name=None,
metadata=None,
scale=None,
translate=None,
opacity=1,... | def add_image(
self,
data=None,
*,
channel_axis=None,
rgb=None,
colormap=None,
contrast_limits=None,
gamma=1,
interpolation="nearest",
rendering="mip",
iso_threshold=0.5,
attenuation=0.5,
name=None,
metadata=None,
scale=None,
translate=None,
opacity=1,... | https://github.com/napari/napari/issues/1231 | ~/conda/envs/all/lib/python3.8/site-packages/napari/layers/image/image.py in __init__(self, data, rgb, colormap, contrast_limits, gamma, interpolation, rendering, iso_threshold, attenuation, name, metadata, scale, translate, opacity, blending, visible, multiscale)
162 init_shape = data[0].shape
163 ... | AttributeError |
def guess_multiscale(data):
"""Guess whether the passed data is multiscale, process it accordingly.
If shape of arrays along first axis is strictly decreasing, the data is
multiscale. If it is the same shape everywhere, it is not. Various
ambiguous conditions in between will result in a ValueError bein... | def guess_multiscale(data):
"""Guess if the passed data is multiscale of not.
If shape of arrays along first axis is strictly decreasing.
Parameters
----------
data : array or list of array
Data that should be checked.
Returns
-------
bool
If data is multiscale or not.... | https://github.com/napari/napari/issues/1231 | ~/conda/envs/all/lib/python3.8/site-packages/napari/layers/image/image.py in __init__(self, data, rgb, colormap, contrast_limits, gamma, interpolation, rendering, iso_threshold, attenuation, name, metadata, scale, translate, opacity, blending, visible, multiscale)
162 init_shape = data[0].shape
163 ... | AttributeError |
def __init__(
self,
data,
*,
rgb=None,
colormap="gray",
contrast_limits=None,
gamma=1,
interpolation="nearest",
rendering="mip",
iso_threshold=0.5,
attenuation=0.5,
name=None,
metadata=None,
scale=None,
translate=None,
opacity=1,
blending="translucent"... | def __init__(
self,
data,
*,
rgb=None,
colormap="gray",
contrast_limits=None,
gamma=1,
interpolation="nearest",
rendering="mip",
iso_threshold=0.5,
attenuation=0.5,
name=None,
metadata=None,
scale=None,
translate=None,
opacity=1,
blending="translucent"... | https://github.com/napari/napari/issues/1231 | ~/conda/envs/all/lib/python3.8/site-packages/napari/layers/image/image.py in __init__(self, data, rgb, colormap, contrast_limits, gamma, interpolation, rendering, iso_threshold, attenuation, name, metadata, scale, translate, opacity, blending, visible, multiscale)
162 init_shape = data[0].shape
163 ... | AttributeError |
def on_key_release(self, event):
"""Called whenever key released in canvas.
Parameters
----------
event : qtpy.QtCore.QEvent
Event from the Qt context.
"""
if event.key is None:
return
combo = components_to_key_combo(event.key.name, event.modifiers)
self.viewer.release_k... | def on_key_release(self, event):
"""Called whenever key released in canvas.
Parameters
----------
event : qtpy.QtCore.QEvent
Event from the Qt context.
"""
combo = components_to_key_combo(event.key.name, event.modifiers)
self.viewer.release_key(combo)
| https://github.com/napari/napari/issues/1203 | WARNING: Traceback (most recent call last):
File "/home/jni/miniconda3/envs/all/lib/python3.8/site-packages/vispy/app/backends/_qt.py", line 505, in keyReleaseEvent
self._keyEvent(self._vispy_canvas.events.key_release, ev)
File "/home/jni/miniconda3/envs/all/lib/python3.8/site-packages/vispy/app/backends/_qt.py", line ... | AttributeError |
def on_draw(self, event):
"""Called whenever the canvas is drawn.
This is triggered from vispy whenever new data is sent to the canvas or
the camera is moved and is connected in the `QtViewer`.
"""
self.layer.scale_factor = self.scale_factor
old_corner_pixels = self.layer.corner_pixels
self... | def on_draw(self, event):
"""Called whenever the canvas is drawn.
This is triggered from vispy whenever new data is sent to the canvas or
the camera is moved and is connected in the `QtViewer`.
"""
self.layer.scale_factor = self.scale_factor
old_corner_pixels = self.layer.corner_pixels
self... | https://github.com/napari/napari/issues/1178 | Traceback (most recent call last):
File "/home/jni/miniconda3/envs/f7/lib/python3.7/site-packages/vispy/app/backends/_qt.py", line 825, in paintGL
self._vispy_canvas.events.draw(region=None)
File "/home/jni/miniconda3/envs/f7/lib/python3.7/site-packages/vispy/util/event.py", line 455, in __call__
self._invoke_callback(... | ValueError |
def _update_multiscale(self, corner_pixels, shape_threshold):
"""Refresh layer multiscale if new resolution level or tile is required.
Parameters
----------
corner_pixels : array
Coordinates of the top-left and bottom-right canvas pixels in the
data space of each layer. The length of th... | def _update_multiscale(self, corner_pixels, shape_threshold):
"""Refresh layer multiscale if new resolution level or tile is required.
Parameters
----------
corner_pixels : array
Coordinates of the top-left and bottom-right canvas pixels in the
data space of each layer. The length of th... | https://github.com/napari/napari/issues/1178 | Traceback (most recent call last):
File "/home/jni/miniconda3/envs/f7/lib/python3.7/site-packages/vispy/app/backends/_qt.py", line 825, in paintGL
self._vispy_canvas.events.draw(region=None)
File "/home/jni/miniconda3/envs/f7/lib/python3.7/site-packages/vispy/util/event.py", line 455, in __call__
self._invoke_callback(... | ValueError |
def _set_view_slice(self):
"""Set the view given the indices to slice with."""
not_disp = self.dims.not_displayed
if self.rgb:
# if rgb need to keep the final axis fixed during the
# transpose. The index of the final axis depends on how many
# axes are displayed.
order = sel... | def _set_view_slice(self):
"""Set the view given the indices to slice with."""
not_disp = self.dims.not_displayed
if self.rgb:
# if rgb need to keep the final axis fixed during the
# transpose. The index of the final axis depends on how many
# axes are displayed.
order = sel... | https://github.com/napari/napari/issues/1178 | Traceback (most recent call last):
File "/home/jni/miniconda3/envs/f7/lib/python3.7/site-packages/vispy/app/backends/_qt.py", line 825, in paintGL
self._vispy_canvas.events.draw(region=None)
File "/home/jni/miniconda3/envs/f7/lib/python3.7/site-packages/vispy/util/event.py", line 455, in __call__
self._invoke_callback(... | ValueError |
def _remove_layer(self, event):
"""When a layer is removed, remove its parent.
Parameters
----------
event : qtpy.QtCore.QEvent
Event from the Qt context.
"""
layer = event.item
vispy_layer = self.layer_to_visual[layer]
self.canvas.events.draw.disconnect(vispy_layer.on_draw)
... | def _remove_layer(self, event):
"""When a layer is removed, remove its parent.
Parameters
----------
event : qtpy.QtCore.QEvent
Event from the Qt context.
"""
layer = event.item
vispy_layer = self.layer_to_visual[layer]
vispy_layer.node.transforms = ChainTransform()
vispy_la... | https://github.com/napari/napari/issues/1157 | Traceback (most recent call last):
File "XXXX\lib\site-packages\vispy\app\backends\_qt.py", line 825, in paintGL
self._vispy_canvas.events.draw(region=None)
File "XXXX\lib\site-packages\vispy\util\event.py", line 455, in __call__
self._invoke_callback(cb, event)
File "XXXX\lib\site-packages\vispy\util\event.py", line 4... | AttributeError |
def scale_factor(self):
"""float: Conversion factor from canvas pixels to data coordinates."""
if self.node.canvas is not None:
transform = self.node.canvas.scene.node_transform(self.node)
return transform.map([1, 1])[0] - transform.map([0, 0])[0]
else:
return 1
| def scale_factor(self):
"""float: Conversion factor from canvas coordinates to image
coordinates, which depends on the current zoom level.
"""
transform = self.node.canvas.scene.node_transform(self.node)
scale_factor = transform.map([1, 1])[0] - transform.map([0, 0])[0]
return scale_factor
| https://github.com/napari/napari/issues/1157 | Traceback (most recent call last):
File "XXXX\lib\site-packages\vispy\app\backends\_qt.py", line 825, in paintGL
self._vispy_canvas.events.draw(region=None)
File "XXXX\lib\site-packages\vispy\util\event.py", line 455, in __call__
self._invoke_callback(cb, event)
File "XXXX\lib\site-packages\vispy\util\event.py", line 4... | AttributeError |
def _transform_position(self, position):
"""Transform cursor position from canvas space (x, y) into image space.
Parameters
-------
position : 2-tuple
Cursor position in canvase (x, y).
Returns
-------
coords : tuple
Coordinates of cursor in image space for displayed dimens... | def _transform_position(self, position):
"""Transform cursor position from canvas space (x, y) into image space.
Parameters
-------
position : 2-tuple
Cursor position in canvase (x, y).
Returns
-------
coords : tuple
Coordinates of cursor in image space for displayed dimens... | https://github.com/napari/napari/issues/1157 | Traceback (most recent call last):
File "XXXX\lib\site-packages\vispy\app\backends\_qt.py", line 825, in paintGL
self._vispy_canvas.events.draw(region=None)
File "XXXX\lib\site-packages\vispy\util\event.py", line 455, in __call__
self._invoke_callback(cb, event)
File "XXXX\lib\site-packages\vispy\util\event.py", line 4... | AttributeError |
def guess_continuous(property: np.ndarray) -> bool:
"""Guess if the property is continuous (return True) or categorical (return False)"""
# if the property is a floating type, guess continuous
if issubclass(property.dtype.type, np.floating) or len(np.unique(property)) > 16:
return True
else:
... | def guess_continuous(property: np.ndarray) -> bool:
"""Guess if the property is continuous (return True) or categorical (return False)"""
# if the property is a floating type, guess continuous
if issubclass(property.dtype.type, np.floating) and len(property < 16):
return True
else:
retur... | https://github.com/napari/napari/issues/930 | (base) czirwc1macos2701:image-demos nsofroniew$ python test-examples/points_properties_empty.py
Traceback (most recent call last):
File "test-examples/points_properties_empty.py", line 29, in <module>
name='points'
File "/Users/nsofroniew/GitHub/napari/napari/components/add_layers_mixin.py", line 366, in add_points
vis... | IndexError |
def __init__(
self,
data=None,
*,
properties=None,
symbol="o",
size=10,
edge_width=1,
edge_color="black",
edge_color_cycle=None,
edge_colormap="viridis",
edge_contrast_limits=None,
face_color="white",
face_color_cycle=None,
face_colormap="viridis",
face_contra... | def __init__(
self,
data=None,
*,
properties=None,
symbol="o",
size=10,
edge_width=1,
edge_color="black",
edge_color_cycle=None,
edge_colormap="viridis",
edge_contrast_limits=None,
face_color="white",
face_color_cycle=None,
face_colormap="viridis",
face_contra... | https://github.com/napari/napari/issues/930 | (base) czirwc1macos2701:image-demos nsofroniew$ python test-examples/points_properties_empty.py
Traceback (most recent call last):
File "test-examples/points_properties_empty.py", line 29, in <module>
name='points'
File "/Users/nsofroniew/GitHub/napari/napari/components/add_layers_mixin.py", line 366, in add_points
vis... | IndexError |
def data(self, data: np.ndarray):
cur_npoints = len(self._data)
self._data = data
# Adjust the size array when the number of points has changed
if len(data) < cur_npoints:
# If there are now fewer points, remove the size and colors of the
# extra ones
with self.events.set_data.b... | def data(self, data: np.ndarray):
cur_npoints = len(self._data)
self._data = data
# Adjust the size array when the number of points has changed
if len(data) < cur_npoints:
# If there are now fewer points, remove the size and colors of the
# extra ones
with self.events.set_data.b... | https://github.com/napari/napari/issues/930 | (base) czirwc1macos2701:image-demos nsofroniew$ python test-examples/points_properties_empty.py
Traceback (most recent call last):
File "test-examples/points_properties_empty.py", line 29, in <module>
name='points'
File "/Users/nsofroniew/GitHub/napari/napari/components/add_layers_mixin.py", line 366, in add_points
vis... | IndexError |
def properties(self, properties: Dict[str, np.ndarray]):
if not isinstance(properties, dict):
properties = dataframe_to_properties(properties)
self._properties = self._validate_properties(properties)
if self._face_color_property and (
self._face_color_property not in self._properties
):
... | def properties(self, properties: Dict[str, np.ndarray]):
if not isinstance(properties, dict):
properties = dataframe_to_properties(properties)
self._properties = self._validate_properties(properties)
if self._face_color_property and (
self._face_color_property not in self._properties
):
... | https://github.com/napari/napari/issues/930 | (base) czirwc1macos2701:image-demos nsofroniew$ python test-examples/points_properties_empty.py
Traceback (most recent call last):
File "test-examples/points_properties_empty.py", line 29, in <module>
name='points'
File "/Users/nsofroniew/GitHub/napari/napari/components/add_layers_mixin.py", line 366, in add_points
vis... | IndexError |
def _validate_properties(self, properties: Dict[str, np.ndarray]):
"""Validates the type and size of the properties"""
for k, v in properties.items():
if len(v) != len(self.data):
raise ValueError("the number of properties must equal the number of points")
# ensure the property value... | def _validate_properties(self, properties: Dict[str, np.ndarray]):
"""Validates the type and size of the properties"""
for v in properties.values():
if len(v) != len(self.data):
raise ValueError("the number of properties must equal the number of points")
return properties
| https://github.com/napari/napari/issues/930 | (base) czirwc1macos2701:image-demos nsofroniew$ python test-examples/points_properties_empty.py
Traceback (most recent call last):
File "test-examples/points_properties_empty.py", line 29, in <module>
name='points'
File "/Users/nsofroniew/GitHub/napari/napari/components/add_layers_mixin.py", line 366, in add_points
vis... | IndexError |
def refresh_colors(self, update_color_mapping: bool = False):
"""Calculate and update face and edge colors if using a cycle or color map
Parameters
----------
update_color_mapping : bool
If set to True, the function will recalculate the color cycle map
or colormap (whichever is being us... | def refresh_colors(self, update_color_mapping: bool = False):
"""Calculate and update face and edge colors if using a cycle or color map
Parameters
----------
update_color_mapping : bool
If set to True, the function will recalculate the color cycle map
or colormap (whichever is being us... | https://github.com/napari/napari/issues/930 | (base) czirwc1macos2701:image-demos nsofroniew$ python test-examples/points_properties_empty.py
Traceback (most recent call last):
File "test-examples/points_properties_empty.py", line 29, in <module>
name='points'
File "/Users/nsofroniew/GitHub/napari/napari/components/add_layers_mixin.py", line 366, in add_points
vis... | IndexError |
def selected_data(self, selected_data):
self._selected_data = set(selected_data)
selected = []
for c in self._selected_data:
if c in self._indices_view:
ind = list(self._indices_view).index(c)
selected.append(ind)
self._selected_view = selected
# Update properties ba... | def selected_data(self, selected_data):
self._selected_data = set(selected_data)
selected = []
for c in self._selected_data:
if c in self._indices_view:
ind = list(self._indices_view).index(c)
selected.append(ind)
self._selected_view = selected
# Update properties ba... | https://github.com/napari/napari/issues/930 | (base) czirwc1macos2701:image-demos nsofroniew$ python test-examples/points_properties_empty.py
Traceback (most recent call last):
File "test-examples/points_properties_empty.py", line 29, in <module>
name='points'
File "/Users/nsofroniew/GitHub/napari/napari/components/add_layers_mixin.py", line 366, in add_points
vis... | IndexError |
def __init__(self, qt_viewer, *, show=True):
self.qt_viewer = qt_viewer
self._qt_window = QMainWindow()
self._qt_window.setAttribute(Qt.WA_DeleteOnClose)
self._qt_window.setUnifiedTitleAndToolBarOnMac(True)
self._qt_center = QWidget(self._qt_window)
self._qt_window.setCentralWidget(self._qt_ce... | def __init__(self, qt_viewer, *, show=True):
self.qt_viewer = qt_viewer
self._qt_window = QMainWindow()
self._qt_window.setAttribute(Qt.WA_DeleteOnClose)
self._qt_window.setUnifiedTitleAndToolBarOnMac(True)
self._qt_center = QWidget(self._qt_window)
self._qt_window.setCentralWidget(self._qt_ce... | https://github.com/napari/napari/issues/1079 | Traceback (most recent call last):
File "/Users/gbokota/Documents/projekty/napari/napari/components/viewer_model.py", line 418, in _toggle_theme
self.theme = theme_names[(cur_theme + 1) % len(theme_names)]
File "/Users/gbokota/Documents/projekty/napari/napari/components/viewer_model.py", line 130, in theme
self.palette... | AttributeError |
def _update_palette(self, event=None):
"""Update widget color palette."""
# set window styles which don't use the primary stylesheet
# FIXME: this is a problem with the stylesheet not using properties
palette = self.qt_viewer.viewer.palette
self._status_bar.setStyleSheet(
template(
... | def _update_palette(self, palette):
"""Update widget color palette.
Parameters
----------
palette : qtpy.QtGui.QPalette
Color palette for each widget state (Active, Disabled, Inactive).
"""
# set window styles which don't use the primary stylesheet
# FIXME: this is a problem with th... | https://github.com/napari/napari/issues/1079 | Traceback (most recent call last):
File "/Users/gbokota/Documents/projekty/napari/napari/components/viewer_model.py", line 418, in _toggle_theme
self.theme = theme_names[(cur_theme + 1) % len(theme_names)]
File "/Users/gbokota/Documents/projekty/napari/napari/components/viewer_model.py", line 130, in theme
self.palette... | AttributeError |
def __init__(self, viewer):
super().__init__()
self.setAttribute(Qt.WA_DeleteOnClose)
self.pool = QThreadPool()
QCoreApplication.setAttribute(Qt.AA_UseStyleSheetPropagationInWidgetStyles, True)
self.viewer = viewer
self.dims = QtDims(self.viewer.dims)
self.controls = QtControls(self.viewer... | def __init__(self, viewer):
super().__init__()
self.setAttribute(Qt.WA_DeleteOnClose)
self.pool = QThreadPool()
QCoreApplication.setAttribute(Qt.AA_UseStyleSheetPropagationInWidgetStyles, True)
self.viewer = viewer
self.dims = QtDims(self.viewer.dims)
self.controls = QtControls(self.viewer... | https://github.com/napari/napari/issues/1079 | Traceback (most recent call last):
File "/Users/gbokota/Documents/projekty/napari/napari/components/viewer_model.py", line 418, in _toggle_theme
self.theme = theme_names[(cur_theme + 1) % len(theme_names)]
File "/Users/gbokota/Documents/projekty/napari/napari/components/viewer_model.py", line 130, in theme
self.palette... | AttributeError |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.