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 init_params(self):
self.v = int_value(self.param.get("V", 0))
self.r = int_value(self.param["R"])
self.p = uint_value(self.param["P"], 32)
self.o = str_value(self.param["O"])
self.u = str_value(self.param["U"])
self.length = int_value(self.param.get("Length", 40))
return
| def init_params(self):
self.v = int_value(self.param.get("V", 0))
self.r = int_value(self.param["R"])
self.p = int_value(self.param["P"])
self.o = str_value(self.param["O"])
self.u = str_value(self.param["U"])
self.length = int_value(self.param.get("Length", 40))
return
| https://github.com/pdfminer/pdfminer.six/issues/186 | Traceback (most recent call last):
File "/mnt/c/Users/aq4'july/Desktop/CleanTextAPI_withNewPdfAnalyser/PdfAnalyzer.py", line 108, in GetTextFromPdf
for page in PDFPage.get_pages(pdfFile):
File "/usr/local/lib/python3.5/dist-packages/pdfminer/pdfpage.py", line 129, in get_pages
doc = PDFDocument(parser, password=passwor... | struct.error |
def compute_encryption_key(self, password):
# Algorithm 3.2
password = (password + self.PASSWORD_PADDING)[:32] # 1
hash = md5.md5(password) # 2
hash.update(self.o) # 3
# See https://github.com/pdfminer/pdfminer.six/issues/186
hash.update(struct.pack("<L", self.p)) # 4
hash.update(self.do... | def compute_encryption_key(self, password):
# Algorithm 3.2
password = (password + self.PASSWORD_PADDING)[:32] # 1
hash = md5.md5(password) # 2
hash.update(self.o) # 3
hash.update(struct.pack("<l", self.p)) # 4
hash.update(self.docid[0]) # 5
if self.r >= 4:
if not self.encrypt_m... | https://github.com/pdfminer/pdfminer.six/issues/186 | Traceback (most recent call last):
File "/mnt/c/Users/aq4'july/Desktop/CleanTextAPI_withNewPdfAnalyser/PdfAnalyzer.py", line 108, in GetTextFromPdf
for page in PDFPage.get_pages(pdfFile):
File "/usr/local/lib/python3.5/dist-packages/pdfminer/pdfpage.py", line 129, in get_pages
doc = PDFDocument(parser, password=passwor... | struct.error |
def isnumber(x):
return isinstance(x, (int, float))
| def isnumber(x):
return isinstance(x, ((int,), float))
| https://github.com/pdfminer/pdfminer.six/issues/186 | Traceback (most recent call last):
File "/mnt/c/Users/aq4'july/Desktop/CleanTextAPI_withNewPdfAnalyser/PdfAnalyzer.py", line 108, in GetTextFromPdf
for page in PDFPage.get_pages(pdfFile):
File "/usr/local/lib/python3.5/dist-packages/pdfminer/pdfpage.py", line 129, in get_pages
doc = PDFDocument(parser, password=passwor... | struct.error |
def getobj(self, objid):
"""Get object from PDF
:raises PDFException if PDFDocument is not initialized
:raises PDFObjectNotFound if objid does not exist in PDF
"""
if not self.xrefs:
raise PDFException("PDFDocument is not initialized")
log.debug("getobj: objid=%r", objid)
if objid i... | def getobj(self, objid):
assert objid != 0
if not self.xrefs:
raise PDFException("PDFDocument is not initialized")
log.debug("getobj: objid=%r", objid)
if objid in self._cached_objs:
(obj, genno) = self._cached_objs[objid]
else:
for xref in self.xrefs:
try:
... | https://github.com/pdfminer/pdfminer.six/issues/94 | $ dumppdf -a invalid.pdf
<pdf>Traceback (most recent call last):
File "/usr/bin/dumppdf", line 268, in <module>
if __name__ == '__main__': sys.exit(main(sys.argv))
File "/usr/bin/dumppdf", line 265, in main
dumpall=dumpall, codec=codec, extractdir=extractdir)
File "/usr/bin/dumppdf", line 216, in dumppdf
dumpallobjs(ou... | AssertionError |
def __init__(self, descriptor, widths, default_width=None):
self.descriptor = descriptor
self.widths = resolve_all(widths)
self.fontname = resolve1(descriptor.get("FontName", "unknown"))
if isinstance(self.fontname, PSLiteral):
self.fontname = literal_name(self.fontname)
self.flags = int_val... | def __init__(self, descriptor, widths, default_width=None):
self.descriptor = descriptor
self.widths = widths
self.fontname = resolve1(descriptor.get("FontName", "unknown"))
if isinstance(self.fontname, PSLiteral):
self.fontname = literal_name(self.fontname)
self.flags = int_value(descriptor... | https://github.com/pdfminer/pdfminer.six/issues/268 | Traceback (most recent call last):
File "./main.py", line 748, in parseEachProfile
self.people.append(parser.parse(None))
File "./main.py", line 322, in parse
poslist = parser.parsepdf2(filename)
File "/Users/____/Dropbox/___/Parser/pdfparsing.py", line 167, in parsepdf2
interpreter.process_page(page)
File "/usr/local/... | TypeError |
def name2unicode(name):
"""Converts Adobe glyph names to Unicode numbers.
In contrast to the specification, this raises a KeyError instead of return an empty string when the key is unknown.
This way the caller must explicitly define what to do when there is not a match.
Reference: https://github.com/a... | def name2unicode(name):
"""Converts Adobe glyph names to Unicode numbers."""
if name in glyphname2unicode:
return glyphname2unicode[name]
m = STRIP_NAME.search(name)
if not m:
raise KeyError(name)
return six.unichr(int(m.group(0)))
| https://github.com/pdfminer/pdfminer.six/issues/177 | Traceback (most recent call last):
File "/Users/rakshabm/Documents/Python/extract_from_pdf.py", line 95, in <module>
interpreter.process_page(page)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pdfminer/pdfinterp.py", line 852, in process_page
self.render_contents(page.resources, p... | OverflowError |
def get_encoding(klass, name, diff=None):
cid2unicode = klass.encodings.get(name, klass.std2unicode)
if diff:
cid2unicode = cid2unicode.copy()
cid = 0
for x in diff:
if isinstance(x, int):
cid = x
elif isinstance(x, PSLiteral):
try:... | def get_encoding(klass, name, diff=None):
cid2unicode = klass.encodings.get(name, klass.std2unicode)
if diff:
cid2unicode = cid2unicode.copy()
cid = 0
for x in diff:
if isinstance(x, int):
cid = x
elif isinstance(x, PSLiteral):
try:... | https://github.com/pdfminer/pdfminer.six/issues/177 | Traceback (most recent call last):
File "/Users/rakshabm/Documents/Python/extract_from_pdf.py", line 95, in <module>
interpreter.process_page(page)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pdfminer/pdfinterp.py", line 852, in process_page
self.render_contents(page.resources, p... | OverflowError |
def get_encoding(self):
"""Parse the font encoding
The Type1 font encoding maps character codes to character names. These character names could either be standard
Adobe glyph names, or character names associated with custom CharStrings for this font. A CharString is a
sequence of operations that descri... | def get_encoding(self):
while 1:
try:
(cid, name) = self.nextobject()
except PSEOF:
break
try:
self._cid2unicode[cid] = name2unicode(name)
except KeyError:
pass
return self._cid2unicode
| https://github.com/pdfminer/pdfminer.six/issues/177 | Traceback (most recent call last):
File "/Users/rakshabm/Documents/Python/extract_from_pdf.py", line 95, in <module>
interpreter.process_page(page)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pdfminer/pdfinterp.py", line 852, in process_page
self.render_contents(page.resources, p... | OverflowError |
def drange(v0, v1, d):
"""Returns a discrete range."""
return range(int(v0) // d, int(v1 + d) // d)
| def drange(v0, v1, d):
"""Returns a discrete range."""
assert v0 < v1, str((v0, v1, d))
return range(int(v0) // d, int(v1 + d) // d)
| https://github.com/pdfminer/pdfminer.six/issues/66 | Traceback (most recent call last):
File "./pdfstats.py", line 81, in <module>
sys.exit(main(sys.argv[1:]))
File "./pdfstats.py", line 71, in main
interpreter.process_page(page)
File "/usr/local/lib/python3.6/site-packages/pdfminer/pdfinterp.py", line 851, in process_page
self.device.end_page(page)
File "/usr/local/lib/... | AssertionError |
def get_cmap(klass, name):
if name == "Identity-H":
return IdentityCMap(WMode=0)
elif name == "Identity-V":
return IdentityCMap(WMode=1)
elif name == "OneByteIdentityH":
return IdentityCMapByte(WMode=0)
elif name == "OneByteIdentityV":
return IdentityCMapByte(WMode=1)
... | def get_cmap(klass, name):
if name == "Identity-H":
return IdentityCMap(WMode=0)
elif name == "Identity-V":
return IdentityCMap(WMode=1)
try:
return klass._cmap_cache[name]
except KeyError:
pass
data = klass._load_data(name)
klass._cmap_cache[name] = cmap = PyCMap... | https://github.com/pdfminer/pdfminer.six/issues/210 | Traceback (most recent call last):
File "/home/felix/anaconda3/bin/pdf2txt.py", line 136, in <module>
if __name__ == '__main__': sys.exit(main())
File "/home/felix/anaconda3/bin/pdf2txt.py", line 131, in main
outfp = extract_text(**vars(A))
File "/home/felix/anaconda3/bin/pdf2txt.py", line 63, in extract_text
pdfminer.... | AttributeError |
def do_keyword(self, pos, token):
if token is self.KEYWORD_BEGINCMAP:
self._in_cmap = True
self.popall()
return
elif token is self.KEYWORD_ENDCMAP:
self._in_cmap = False
return
if not self._in_cmap:
return
#
if token is self.KEYWORD_DEF:
try:
... | def do_keyword(self, pos, token):
if token is self.KEYWORD_BEGINCMAP:
self._in_cmap = True
self.popall()
return
elif token is self.KEYWORD_ENDCMAP:
self._in_cmap = False
return
if not self._in_cmap:
return
#
if token is self.KEYWORD_DEF:
try:
... | https://github.com/pdfminer/pdfminer.six/issues/210 | Traceback (most recent call last):
File "/home/felix/anaconda3/bin/pdf2txt.py", line 136, in <module>
if __name__ == '__main__': sys.exit(main())
File "/home/felix/anaconda3/bin/pdf2txt.py", line 131, in main
outfp = extract_text(**vars(A))
File "/home/felix/anaconda3/bin/pdf2txt.py", line 63, in extract_text
pdfminer.... | AttributeError |
def main(argv):
args = argv[1:]
for fname in args:
fp = open(fname, "rb")
cmap = FileUnicodeMap()
CMapParser(cmap, fp).run()
fp.close()
cmap.dump()
return
| def main(argv):
args = argv[1:]
for fname in args:
fp = open(fname, "rb")
cmap = FileUnicodeMap()
# cmap = FileCMap()
CMapParser(cmap, fp).run()
fp.close()
cmap.dump()
return
| https://github.com/pdfminer/pdfminer.six/issues/210 | Traceback (most recent call last):
File "/home/felix/anaconda3/bin/pdf2txt.py", line 136, in <module>
if __name__ == '__main__': sys.exit(main())
File "/home/felix/anaconda3/bin/pdf2txt.py", line 131, in main
outfp = extract_text(**vars(A))
File "/home/felix/anaconda3/bin/pdf2txt.py", line 63, in extract_text
pdfminer.... | AttributeError |
def decode(self, code):
n = len(code)
if n:
return struct.unpack(">%dB" % n, code)
else:
return ()
| def decode(self, code):
n = len(code) // 2
if n:
return struct.unpack(">%dH" % n, code)
else:
return ()
| https://github.com/pdfminer/pdfminer.six/issues/210 | Traceback (most recent call last):
File "/home/felix/anaconda3/bin/pdf2txt.py", line 136, in <module>
if __name__ == '__main__': sys.exit(main())
File "/home/felix/anaconda3/bin/pdf2txt.py", line 131, in main
outfp = extract_text(**vars(A))
File "/home/felix/anaconda3/bin/pdf2txt.py", line 63, in extract_text
pdfminer.... | AttributeError |
def __init__(self, rsrcmgr, spec, strict=settings.STRICT):
try:
self.basefont = literal_name(spec["BaseFont"])
except KeyError:
if strict:
raise PDFFontError("BaseFont is missing")
self.basefont = "unknown"
self.cidsysteminfo = dict_value(spec.get("CIDSystemInfo", {}))
... | def __init__(self, rsrcmgr, spec, strict=settings.STRICT):
try:
self.basefont = literal_name(spec["BaseFont"])
except KeyError:
if strict:
raise PDFFontError("BaseFont is missing")
self.basefont = "unknown"
self.cidsysteminfo = dict_value(spec.get("CIDSystemInfo", {}))
... | https://github.com/pdfminer/pdfminer.six/issues/210 | Traceback (most recent call last):
File "/home/felix/anaconda3/bin/pdf2txt.py", line 136, in <module>
if __name__ == '__main__': sys.exit(main())
File "/home/felix/anaconda3/bin/pdf2txt.py", line 131, in main
outfp = extract_text(**vars(A))
File "/home/felix/anaconda3/bin/pdf2txt.py", line 63, in extract_text
pdfminer.... | AttributeError |
def main(argv):
for fname in argv[1:]:
fp = open(fname, "rb")
font = CFFFont(fname, fp)
print(font)
fp.close()
return
| def main(argv):
for fname in argv[1:]:
fp = open(fname, "rb")
# font = TrueTypeFont(fname, fp)
font = CFFFont(fname, fp)
print(font)
fp.close()
return
| https://github.com/pdfminer/pdfminer.six/issues/210 | Traceback (most recent call last):
File "/home/felix/anaconda3/bin/pdf2txt.py", line 136, in <module>
if __name__ == '__main__': sys.exit(main())
File "/home/felix/anaconda3/bin/pdf2txt.py", line 131, in main
outfp = extract_text(**vars(A))
File "/home/felix/anaconda3/bin/pdf2txt.py", line 63, in extract_text
pdfminer.... | AttributeError |
def _prepare_requests(self):
"""Created the TTS API the request(s) without sending them.
Returns:
list: ``requests.PreparedRequests_``. <https://2.python-requests.org/en/master/api/#requests.PreparedRequest>`_``.
"""
# TTS API URL
translate_url = _translate_url(
tld=self.tld, path="... | def _prepare_requests(self):
"""Created the TTS API the request(s) without sending them.
Returns:
list: ``requests.PreparedRequests_``. <https://2.python-requests.org/en/master/api/#requests.PreparedRequest>`_``.
"""
# TTS API URL
translate_url = _translate_url(
tld=self.tld, path="... | https://github.com/pndurette/gTTS/issues/252 | Traceback (most recent call last):
File "main.py", line 11, in <module>
myobj.save("audiobook.mp3")
File "/usr/local/lib/python3.8/dist-packages/gtts/tts.py", line 311, in save
self.write_to_fp(f)
File "/usr/local/lib/python3.8/dist-packages/gtts/tts.py", line 293, in write_to_fp
raise gTTSError(tts=self, response=r)
g... | gtts.tts.gTTSError |
def _package_rpc(self, text):
parameter = [text, self.lang, self.speed, "null"]
escaped_parameter = json.dumps(parameter, separators=(",", ":"))
rpc = [[[self.GOOGLE_TTS_RPC, escaped_parameter, None, "generic"]]]
espaced_rpc = json.dumps(rpc, separators=(",", ":"))
return "f.req={}&".format(quote(e... | def _package_rpc(self):
parameter = [self.text, self.lang, self.speed, "null"]
escaped_parameter = json.dumps(parameter, separators=(",", ":"))
rpc = [[[self.GOOGLE_TTS_RPC, escaped_parameter, None, "generic"]]]
espaced_rpc = json.dumps(rpc, separators=(",", ":"))
return "f.req={}&".format(quote(es... | https://github.com/pndurette/gTTS/issues/252 | Traceback (most recent call last):
File "main.py", line 11, in <module>
myobj.save("audiobook.mp3")
File "/usr/local/lib/python3.8/dist-packages/gtts/tts.py", line 311, in save
self.write_to_fp(f)
File "/usr/local/lib/python3.8/dist-packages/gtts/tts.py", line 293, in write_to_fp
raise gTTSError(tts=self, response=r)
g... | gtts.tts.gTTSError |
def __init__(
self, name: str, permutation: Union[List[Union[int, np.int_]], np.ndarray]
):
if not isinstance(name, str):
raise TypeError("Gate name must be a string")
if name in RESERVED_WORDS:
raise ValueError(
f"Cannot use {name} for a gate name since it's a reserved word"
... | def __init__(
self, name: str, permutation: Union[List[Union[int, np.int_]], np.ndarray]
):
if not isinstance(name, str):
raise TypeError("Gate name must be a string")
if name in RESERVED_WORDS:
raise ValueError(
"Cannot use {} for a gate name since it's a reserved word".format(... | https://github.com/rigetti/pyquil/issues/1223 | import numpy as np
from pyquil.quilbase import DefPermutationGate
DefPermutationGate('MYGATE', [0, 1, 2, 3, 4, 5, 7, 6])
<pyquil.quilbase.DefPermutationGate object at 0x0000021D192D0820>
DefPermutationGate('MYGATE', np.array([0, 1, 2, 3, 4, 5, 7, 6]))
Traceback (most recent call last):
File "<stdin>", line 1, in <modul... | ValueError |
def load(self, executable):
if isinstance(executable, PyQuilExecutableResponse):
program = _extract_program_from_pyquil_executable_response(executable)
else:
program = executable
# initialize program counter
self.program = program
self.program_counter = 0
self._memory_results = ... | def load(self, executable):
if isinstance(executable, PyQuilExecutableResponse):
program = _extract_program_from_pyquil_executable_response(executable)
else:
program = executable
# initialize program counter
self.program = program
self.program_counter = 0
self._memory_results = ... | https://github.com/rigetti/pyquil/issues/1059 | KeyError Traceback (most recent call last)
<ipython-input-14-a45963b2b08a> in <module>
----> 1 qc.execute(p).wf_simulator.wf.flatten()
~/miniconda3/envs/py36/lib/python3.6/site-packages/pyquil/pyqvm.py in execute(self, program)
449 halted = len(program) == 0
450 while n... | KeyError |
def run(self):
self.status = "running"
self._memory_results = {}
for _ in range(self.program.num_shots):
self.wf_simulator.reset()
self._execute_program()
for name in self.ram.keys():
self._memory_results.setdefault(name, list())
self._memory_results[name].ap... | def run(self):
self.status = "running"
self._memory_results = {}
for _ in range(self.program.num_shots):
self.wf_simulator.reset()
self.execute(self.program)
for name in self.ram.keys():
self._memory_results.setdefault(name, list())
self._memory_results[name]... | https://github.com/rigetti/pyquil/issues/1059 | KeyError Traceback (most recent call last)
<ipython-input-14-a45963b2b08a> in <module>
----> 1 qc.execute(p).wf_simulator.wf.flatten()
~/miniconda3/envs/py36/lib/python3.6/site-packages/pyquil/pyqvm.py in execute(self, program)
449 halted = len(program) == 0
450 while n... | KeyError |
def execute(self, program: Program):
"""
Execute one outer loop of a program on the QVM.
Note that the QAM is stateful. Subsequent calls to :py:func:`execute` will not
automatically reset the wavefunction or the classical RAM. If this is desired,
consider starting your program with ``RESET``.
... | def execute(self, program: Program):
"""
Execute one outer loop of a program on the QVM.
Note that the QAM is stateful. Subsequent calls to :py:func:`execute` will not
automatically reset the wavefunction or the classical RAM. If this is desired,
consider starting your program with ``RESET``.
... | https://github.com/rigetti/pyquil/issues/1059 | KeyError Traceback (most recent call last)
<ipython-input-14-a45963b2b08a> in <module>
----> 1 qc.execute(p).wf_simulator.wf.flatten()
~/miniconda3/envs/py36/lib/python3.6/site-packages/pyquil/pyqvm.py in execute(self, program)
449 halted = len(program) == 0
450 while n... | KeyError |
def body(circuit, settings):
"""
Return the body of the Latex document, including the entire circuit in
TikZ format.
:param Program circuit: The circuit to be drawn, represented as a pyquil program.
:param dict settings:
:return: Latex string to draw the entire circuit.
:rtype: string
... | def body(circuit, settings):
"""
Return the body of the Latex document, including the entire circuit in
TikZ format.
:param Program circuit: The circuit to be drawn, represented as a pyquil program.
:param dict settings:
:return: Latex string to draw the entire circuit.
:rtype: string
... | https://github.com/rigetti/pyquil/issues/637 | AttributeError Traceback (most recent call last)
<ipython-input-26-d8bbe53f84fe> in <module>
1 test_p = Program("DECLARE beta REAL", "H 0")
----> 2 print(to_latex(test_p))
~/anaconda3/envs/pyquil2/lib/python3.7/site-packages/pyquil/latex/latex_generation.py in to_latex(circuit, settings)
63 ... | AttributeError |
def run_bell_high_level(n_shots=1000):
# Step 1. Get a device. Either a QVM or a QPU
qc = get_qc("9q-generic-qvm")
q = [4, 5] # qubits
# Step 2. Construct your program
program = Program(H(q[0]), CNOT(q[0], q[1]))
# Step 3. Run
results = qc.run_and_measure(program, trials=n_shots)
# B... | def run_bell_high_level(n_shots=1000):
# Step 1. Get a device. Either a QVM or a QPU
qc = get_qc("9q-generic-qvm")
q = [4, 5] # qubits
# Step 2. Construct your program
program = Program(H(q[0]), CNOT(q[0], q[1]))
# Step 3. Run
bitstrings = qc.run_and_measure(program, trials=n_shots)
... | https://github.com/rigetti/pyquil/issues/572 | `ValueError: if c is a list/tuple, its first member should be a string
Please enter number of sides: 60
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-30-d058bffa3dca> in <module>()
65 number_of... | ValueError |
def run_bell_low_level(n_shots=1000):
# Step 1. Get some device components
qc = get_qc("9q-generic-qvm")
compiler = qc.compiler
qam = qc.qam
del qc
q = [4, 5] # qubits
# Step 2. Construct your program
program = Program()
program += H(q[0])
program += CNOT(q[0], q[1])
# St... | def run_bell_low_level(n_shots=1000):
# Step 1. Get some device components
qc = get_qc("9q-generic-qvm")
compiler = qc.compiler
qam = qc.qam
del qc
q = [4, 5] # qubits
# Step 2. Construct your program
program = Program()
program += H(q[0])
program += CNOT(q[0], q[1])
# St... | https://github.com/rigetti/pyquil/issues/572 | `ValueError: if c is a list/tuple, its first member should be a string
Please enter number of sides: 60
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-30-d058bffa3dca> in <module>()
65 number_of... | ValueError |
def meyer_penny_program():
"""
Returns the program to simulate the Meyer-Penny Game
The full description is available in docs/source/examples.rst
:return: pyQuil Program
"""
prog = pq.Program()
ro = prog.declare("ro")
picard_register = ro[1]
answer_register = ro[0]
then_branch ... | def meyer_penny_program():
"""
Returns the program to simulate the Meyer-Penny Game
The full description is available in docs/source/examples.rst
:return: pyQuil Program
"""
picard_register = 1
answer_register = 0
then_branch = pq.Program(X(0))
else_branch = pq.Program(I(0))
... | https://github.com/rigetti/pyquil/issues/572 | `ValueError: if c is a list/tuple, its first member should be a string
Please enter number of sides: 60
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-30-d058bffa3dca> in <module>()
65 number_of... | ValueError |
def qaoa_ansatz(gammas, betas):
"""
Function that returns a QAOA ansatz program for a list of angles betas and gammas. len(betas) ==
len(gammas) == P for a QAOA program of order P.
:param list(float) gammas: Angles over which to parameterize the cost Hamiltonian.
:param list(float) betas: Angles ov... | def qaoa_ansatz(gammas, betas):
"""
Function that returns a QAOA ansatz program for a list of angles betas and gammas. len(betas) ==
len(gammas) == P for a QAOA program of order P.
:param list(float) gammas: Angles over which to parameterize the cost Hamiltonian.
:param list(float) betas: Angles ov... | https://github.com/rigetti/pyquil/issues/572 | `ValueError: if c is a list/tuple, its first member should be a string
Please enter number of sides: 60
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-30-d058bffa3dca> in <module>()
65 number_of... | ValueError |
def die_program(n):
"""
Generate a quantum program to roll a die of n faces.
"""
prog = pq.Program()
ro = prog.declare("ro")
qubits = qubits_needed(n)
# Hadamard initialize.
for q in range(qubits):
prog.inst(H(q))
# Measure everything.
for q in range(qubits):
prog... | def die_program(n):
"""
Generate a quantum program to roll a die of n faces.
"""
prog = pq.Program()
qubits = qubits_needed(n)
# Hadamard initialize.
for q in range(qubits):
prog.inst(H(q))
# Measure everything.
for q in range(qubits):
prog.measure(q, [q])
return ... | https://github.com/rigetti/pyquil/issues/572 | `ValueError: if c is a list/tuple, its first member should be a string
Please enter number of sides: 60
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-30-d058bffa3dca> in <module>()
65 number_of... | ValueError |
def roll_die(n):
"""
Roll an n-sided quantum die.
"""
addresses = list(range(qubits_needed(n)))
if n not in dice:
dice[n] = die_program(n)
die = dice[n]
# Generate results and do rejection sampling.
while True:
results = qvm.run(die, addresses, BATCH_SIZE)
for r i... | def roll_die(n):
"""
Roll an n-sided quantum die.
"""
addresses = list(range(qubits_needed(n)))
if not n in dice:
dice[n] = die_program(n)
die = dice[n]
# Generate results and do rejection sampling.
while True:
results = qvm.run(die, addresses, BATCH_SIZE)
for r i... | https://github.com/rigetti/pyquil/issues/572 | `ValueError: if c is a list/tuple, its first member should be a string
Please enter number of sides: 60
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-30-d058bffa3dca> in <module>()
65 number_of... | ValueError |
def teleport(start_index, end_index, ancilla_index):
"""Teleport a qubit from start to end using an ancilla qubit"""
program = make_bell_pair(end_index, ancilla_index)
ro = program.declare("ro")
# do the teleportation
program.inst(CNOT(start_index, ancilla_index))
program.inst(H(start_index))
... | def teleport(start_index, end_index, ancilla_index):
"""Teleport a qubit from start to end using an ancilla qubit"""
program = make_bell_pair(end_index, ancilla_index)
# do the teleportation
program.inst(CNOT(start_index, ancilla_index))
program.inst(H(start_index))
# measure the results and s... | https://github.com/rigetti/pyquil/issues/572 | `ValueError: if c is a list/tuple, its first member should be a string
Please enter number of sides: 60
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-30-d058bffa3dca> in <module>()
65 number_of... | ValueError |
def declare(
self, name, memory_type="BIT", memory_size=1, shared_region=None, offsets=None
):
"""DECLARE a quil variable
This adds the declaration to the current program and returns a MemoryReference to the
base (offset = 0) of the declared memory.
.. note::
This function returns a Memory... | def declare(self, name, memory_type, memory_size=1, shared_region=None, offsets=None):
"""DECLARE a quil variable
This adds the declaration to the current program and returns a MemoryReference to the
base (offset = 0) of the declared memory.
.. note::
This function returns a MemoryReference an... | https://github.com/rigetti/pyquil/issues/572 | `ValueError: if c is a list/tuple, its first member should be a string
Please enter number of sides: 60
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-30-d058bffa3dca> in <module>()
65 number_of... | ValueError |
def load(self, executable):
"""
Initialize a QAM into a fresh state.
:param executable: Load a compiled executable onto the QAM.
"""
if self.status == "loaded":
warnings.warn("Overwriting previously loaded executable.")
assert self.status in ["connected", "done", "loaded"]
self._va... | def load(self, executable):
"""
Initialize a QAM into a fresh state.
:param executable: Load a compiled executable onto the QAM.
"""
assert self.status in ["connected", "done"]
self._variables_shim = {}
self._executable = executable
self._bitstrings = None
self.status = "loaded"
... | https://github.com/rigetti/pyquil/issues/580 | Traceback (most recent call last):
File "tmp.py", line 13, in <module>
print(qvm.run(p))
File "/usr/local/lib/python3.7/site-packages/pyquil/api/_error_reporting.py", line 234, in wrapper
val = func(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/pyquil/api/_quantum_computer.py", line 123, in run
return s... | KeyError |
def run(self):
"""
Run a pyquil program on the QPU.
This formats the classified data from the QPU server by stacking measured bits into
an array of shape (trials, classical_addresses). The mapping of qubit to
classical address is backed out from MEASURE instructions in the program, so
only do m... | def run(self):
"""
Run a pyquil program on the QPU.
This formats the classified data from the QPU server by stacking measured bits into
an array of shape (trials, classical_addresses). The mapping of qubit to
classical address is backed out from MEASURE instructions in the program, so
only do m... | https://github.com/rigetti/pyquil/issues/580 | Traceback (most recent call last):
File "tmp.py", line 13, in <module>
print(qvm.run(p))
File "/usr/local/lib/python3.7/site-packages/pyquil/api/_error_reporting.py", line 234, in wrapper
val = func(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/pyquil/api/_quantum_computer.py", line 123, in run
return s... | KeyError |
def run(self):
"""
Run a Quil program on the QVM multiple times and return the values stored in the
classical registers designated by the classical_addresses parameter.
:return: An array of bitstrings of shape ``(trials, len(classical_addresses))``
"""
super().run()
if isinstance(self._ex... | def run(self):
"""
Run a Quil program on the QVM multiple times and return the values stored in the
classical registers designated by the classical_addresses parameter.
:return: An array of bitstrings of shape ``(trials, len(classical_addresses))``
"""
super().run()
if isinstance(self._ex... | https://github.com/rigetti/pyquil/issues/580 | Traceback (most recent call last):
File "tmp.py", line 13, in <module>
print(qvm.run(p))
File "/usr/local/lib/python3.7/site-packages/pyquil/api/_error_reporting.py", line 234, in wrapper
val = func(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/pyquil/api/_quantum_computer.py", line 123, in run
return s... | KeyError |
def dagger(self, inv_dict=None, suffix="-INV"):
"""
Creates the conjugate transpose of the Quil program. The program must not
contain any irreversible actions (measurement, control flow, qubit allocation).
:return: The Quil program's inverse
:rtype: Program
"""
if not self.is_protoquil():
... | def dagger(self, inv_dict=None, suffix="-INV"):
"""
Creates the conjugate transpose of the Quil program. The program must not
contain any irreversible actions (measurement, control flow, qubit allocation).
:return: The Quil program's inverse
:rtype: Program
"""
if not self.is_protoquil():
... | https://github.com/rigetti/pyquil/issues/304 | DEFGATE CRY(%theta):
1, 0, 0, 0
0, 1, 0, 0
0, 0, cos(%theta/2), -1*sin(%theta/2)
0, 0, sin(%theta/2), cos(%theta/2)
CRY(0) 0 1
CRY-INV 0 1
---------------------------------------------------------------------------
QVMError Traceback (most recent call last)
<ipython-input-2-83481f0061... | QVMError |
def out(self):
"""
Prints a readable Quil string representation of this gate.
:returns: String representation of a gate
:rtype: string
"""
def format_matrix_element(element):
"""
Formats a parameterized matrix element.
:param element: {int, float, complex, str} The par... | def out(self):
"""
Prints a readable Quil string representation of this gate.
:returns: String representation of a gate
:rtype: string
"""
def format_matrix_element(element):
"""
Formats a parameterized matrix element.
:param element: {int, float, complex, str} The par... | https://github.com/rigetti/pyquil/issues/138 | Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/steven/workspace/pyquil/pyquil/quilbase.py", line 208, in out
fcols = [format_matrix_element(col) for col in row]
File "/Users/steven/workspace/pyquil/pyquil/quilbase.py", line 208, in <listcomp>
fcols = [format_matrix_element(col) for ... | AssertionError |
def format_matrix_element(element):
"""
Formats a parameterized matrix element.
:param element: {int, float, complex, str} The parameterized element to format.
"""
if isinstance(element, integer_types) or isinstance(
element, (float, complex, np.int_)
):
return format_parameter(... | def format_matrix_element(element):
"""
Formats a parameterized matrix element.
:param element: {int, float, complex, str} The parameterized element to format.
"""
if isinstance(element, integer_types) or isinstance(element, (float, complex)):
return format_parameter(element)
elif isins... | https://github.com/rigetti/pyquil/issues/138 | Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/steven/workspace/pyquil/pyquil/quilbase.py", line 208, in out
fcols = [format_matrix_element(col) for col in row]
File "/Users/steven/workspace/pyquil/pyquil/quilbase.py", line 208, in <listcomp>
fcols = [format_matrix_element(col) for ... | AssertionError |
def format_parameter(element):
"""
Formats a particular parameter. Essentially the same as built-in formatting except using 'i' instead of 'j' for
the imaginary number.
:param element: {int, float, long, complex, Slot} Formats a parameter for Quil output.
"""
if isinstance(element, integer_type... | def format_parameter(element):
"""
Formats a particular parameter. Essentially the same as built-in formatting except using 'i' instead of 'j' for
the imaginary number.
:param element: {int, float, long, complex, Slot} Formats a parameter for Quil output.
"""
if isinstance(element, integer_type... | https://github.com/rigetti/pyquil/issues/138 | Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/steven/workspace/pyquil/pyquil/quilbase.py", line 208, in out
fcols = [format_matrix_element(col) for col in row]
File "/Users/steven/workspace/pyquil/pyquil/quilbase.py", line 208, in <listcomp>
fcols = [format_matrix_element(col) for ... | AssertionError |
def decode(self):
"""
Decodes the result of the job.
:return: Depends on the type of job. A JSON object.
"""
return self.result["result"]
| def decode(self):
"""
Decodes the result of the job.
:return: Depends on the type of job. A JSON object.
"""
return json.loads(self.result["result"])
| https://github.com/rigetti/pyquil/issues/130 | from pyquil.quil import Program
from pyquil.gates import *
import pyquil.api as api
cxn = api.JobConnection(endpoint="https://job.rigetti.com/beta")
res = cxn.run(Program(X(0)).measure(0, 0), [0])
# wait a bit
res.get()
res.decode()
---------------------------------------------------------------------------
TypeError... | TypeError |
def add_armory_library(sdk_path: str, name: str, rel_path=False) -> str:
if rel_path:
sdk_path = "../" + os.path.relpath(sdk_path, arm.utils.get_fp()).replace(
"\\", "/"
)
return (
('project.addLibrary("' + sdk_path + "/" + name + '");\n')
.replace("\\", "/")
... | def add_armory_library(sdk_path, name, rel_path=False):
if rel_path:
sdk_path = "../" + os.path.relpath(sdk_path, arm.utils.get_fp()).replace(
"\\", "/"
)
return (
('project.addLibrary("' + sdk_path + "/" + name + '");\n')
.replace("\\", "/")
.replace("//", "/... | https://github.com/armory3d/armory/issues/1519 | location: <unknown location>:-1
Error: Traceback (most recent call last):
File "C:\Users\nobody\Documents\ArmorySDK//armory/blender\arm\props_ui.py", line 457, in execute
make.play()
File "C:\Users\nobody\Documents\ArmorySDK//armory/blender\arm\make.py", line 462, in play
build(target=runtime_to_target(), is_play=True)... | FileNotFoundError |
def add_assets(path: str, quality=1.0, use_data_dir=False, rel_path=False) -> str:
if not bpy.data.worlds["Arm"].arm_minimize and path.endswith(".arm"):
path = path[:-4] + ".json"
if rel_path:
path = os.path.relpath(path, arm.utils.get_fp()).replace("\\", "/")
notinlist = not path.endswith... | def add_assets(path, quality=1.0, use_data_dir=False, rel_path=False):
if not bpy.data.worlds["Arm"].arm_minimize and path.endswith(".arm"):
path = path[:-4] + ".json"
if rel_path:
path = os.path.relpath(path, arm.utils.get_fp()).replace("\\", "/")
notinlist = not path.endswith(".ttf") # ... | https://github.com/armory3d/armory/issues/1519 | location: <unknown location>:-1
Error: Traceback (most recent call last):
File "C:\Users\nobody\Documents\ArmorySDK//armory/blender\arm\props_ui.py", line 457, in execute
make.play()
File "C:\Users\nobody\Documents\ArmorySDK//armory/blender\arm\make.py", line 462, in play
build(target=runtime_to_target(), is_play=True)... | FileNotFoundError |
def add_shaders(path: str, rel_path=False) -> str:
if rel_path:
path = os.path.relpath(path, arm.utils.get_fp())
return 'project.addShaders("' + path.replace("\\", "/").replace("//", "/") + '");\n'
| def add_shaders(path, rel_path=False):
if rel_path:
path = os.path.relpath(path, arm.utils.get_fp())
return 'project.addShaders("' + path.replace("\\", "/").replace("//", "/") + '");\n'
| https://github.com/armory3d/armory/issues/1519 | location: <unknown location>:-1
Error: Traceback (most recent call last):
File "C:\Users\nobody\Documents\ArmorySDK//armory/blender\arm\props_ui.py", line 457, in execute
make.play()
File "C:\Users\nobody\Documents\ArmorySDK//armory/blender\arm\make.py", line 462, in play
build(target=runtime_to_target(), is_play=True)... | FileNotFoundError |
def write_khafilejs(
is_play,
export_physics: bool,
export_navigation: bool,
export_ui: bool,
is_publish: bool,
enable_dce: bool,
import_traits: List[str],
import_logicnodes,
) -> None:
wrd = bpy.data.worlds["Arm"]
sdk_path = arm.utils.get_sdk_path()
rel_path = arm.utils.get... | def write_khafilejs(
is_play,
export_physics,
export_navigation,
export_ui,
is_publish,
enable_dce,
import_traits,
import_logicnodes,
):
sdk_path = arm.utils.get_sdk_path()
rel_path = arm.utils.get_relative_paths() # Convert absolute paths to relative
wrd = bpy.data.worlds["... | https://github.com/armory3d/armory/issues/1519 | location: <unknown location>:-1
Error: Traceback (most recent call last):
File "C:\Users\nobody\Documents\ArmorySDK//armory/blender\arm\props_ui.py", line 457, in execute
make.play()
File "C:\Users\nobody\Documents\ArmorySDK//armory/blender\arm\make.py", line 462, in play
build(target=runtime_to_target(), is_play=True)... | FileNotFoundError |
def write_config(resx, resy):
wrd = bpy.data.worlds["Arm"]
p = os.path.join(arm.utils.get_fp(), "Bundled")
if not os.path.exists(p):
os.makedirs(p)
rpdat = arm.utils.get_rp()
rp_shadowmap_cube = int(rpdat.rp_shadowmap_cube) if rpdat.rp_shadows else 0
rp_shadowmap_cascade = arm.utils.get... | def write_config(resx, resy):
wrd = bpy.data.worlds["Arm"]
p = arm.utils.get_fp() + "/Bundled"
if not os.path.exists(p):
os.makedirs(p)
output = {}
output["window_mode"] = get_winmode(wrd.arm_winmode)
output["window_w"] = int(resx)
output["window_h"] = int(resy)
output["window_re... | https://github.com/armory3d/armory/issues/1519 | location: <unknown location>:-1
Error: Traceback (most recent call last):
File "C:\Users\nobody\Documents\ArmorySDK//armory/blender\arm\props_ui.py", line 457, in execute
make.play()
File "C:\Users\nobody\Documents\ArmorySDK//armory/blender\arm\make.py", line 462, in play
build(target=runtime_to_target(), is_play=True)... | FileNotFoundError |
def build_default_node(inp: bpy.types.NodeSocket):
"""Creates a new node to give a not connected input socket a value"""
is_custom_socket = isinstance(inp, arm.logicnode.arm_sockets.ArmCustomSocket)
if is_custom_socket:
# ArmCustomSockets need to implement get_default_value()
default_value... | def build_default_node(inp: bpy.types.NodeSocket):
"""Creates a new node to give a not connected input socket a value"""
is_custom_socket = isinstance(inp, arm.logicnode.arm_sockets.ArmCustomSocket)
if is_custom_socket:
# ArmCustomSockets need to implement get_default_value()
default_value... | https://github.com/armory3d/armory/issues/1870 | Error: Traceback (most recent call last):
File "D:\Armory\ArmorySDK//armory/blender\arm\props_ui.py", line 543, in execute
make.play()
File "D:\Armory\ArmorySDK//armory/blender\arm\make.py", line 482, in play
build(target=runtime_to_target(), is_play=True)
File "D:\Armory\ArmorySDK//armory/blender\arm\make.py", line 37... | AttributeError |
def property0(self):
return (
arm.utils.safesrc(bpy.data.worlds["Arm"].arm_project_package)
+ ".node."
+ arm.utils.safesrc(self.property0_.name)
)
| def property0(self):
return (
arm.utils.safesrc(bpy.data.worlds["Arm"].arm_project_package)
+ ".node."
+ arm.utils.safesrc(self.property0_)
)
| https://github.com/armory3d/armory/issues/1576 | Traceback (most recent call last):
File "/home/dzynek/Armory3D/ArmorySDK2002/ArmorySDK//armory/blender/arm/props_ui.py", line 457, in execute
make.play()
File "/home/dzynek/Armory3D/ArmorySDK2002/ArmorySDK//armory/blender/arm/make.py", line 474, in play
build(target=runtime_to_target(), is_play=True)
File "/home/dzynek... | AttributeError |
def get_files_number(self, filter_info=None):
from funcy import ilen
if not self.use_cache or not self.hash_info:
return 0
if not self.hash_info.isdir:
return 1
if not filter_info or filter_info == self.path_info:
return self.hash_info.nfiles or 0
if not self.hash_info.di... | def get_files_number(self, filter_info=None):
from funcy import ilen
if not self.use_cache or not self.hash_info:
return 0
if not self.hash_info.isdir:
return 1
if not filter_info or filter_info == self.path_info:
return self.hash_info.nfiles or 0
if not self.hash_info.di... | https://github.com/iterative/dvc/issues/5577 | $ dvc pull baz/bar -v
2021-03-09 15:17:11,217 DEBUG: Check for update is enabled.
2021-03-09 15:17:11,234 DEBUG: Checking if stage 'baz/bar' is in 'dvc.yaml'
2021-03-09 15:17:12,011 DEBUG: Preparing to download data from 'gs://batuhan-test/'
2021-03-09 15:17:12,012 DEBUG: Preparing to collect status from gs://batuhan-t... | TypeError |
def __init__(self, fobj):
self.fobj = fobj
self.md5 = hashlib.md5()
self.is_text_file = None
super().__init__()
| def __init__(self, fobj):
self.md5 = hashlib.md5()
self.is_text_file = None
self.reader = fobj.read1 if hasattr(fobj, "read1") else fobj.read
| https://github.com/iterative/dvc/issues/5506 | dvc add --to-remote -o datasets/my-dataset/ --file my-dataset.dvc afile.zip --verbose
2021-02-23 08:28:44,338 DEBUG: Check for update is enabled.
Adding...
2021-02-23 08:28:46,408 ERROR: unexpected error - 'HashedStreamReader' object has no attribute 'tell'
------------------------------------------------------------
T... | AttributeError |
def read(self, n=-1):
chunk = self._reader(n)
if self.is_text_file is None:
self.is_text_file = istextblock(chunk)
if self.is_text_file:
data = dos2unix(chunk)
else:
data = chunk
self.md5.update(data)
return chunk
| def read(self, n=-1):
chunk = self.reader(n)
if self.is_text_file is None:
self.is_text_file = istextblock(chunk)
if self.is_text_file:
data = dos2unix(chunk)
else:
data = chunk
self.md5.update(data)
return chunk
| https://github.com/iterative/dvc/issues/5506 | dvc add --to-remote -o datasets/my-dataset/ --file my-dataset.dvc afile.zip --verbose
2021-02-23 08:28:44,338 DEBUG: Check for update is enabled.
Adding...
2021-02-23 08:28:46,408 ERROR: unexpected error - 'HashedStreamReader' object has no attribute 'tell'
------------------------------------------------------------
T... | AttributeError |
def matches(pattern, path, is_dir) -> bool:
matches_ = bool(pattern.match(path))
if is_dir:
matches_ |= bool(pattern.match(f"{path}/"))
return matches_
| def matches(self, dirname, basename, is_dir=False):
path = self._get_normalize_path(dirname, basename)
if not path:
return False
return self.ignore(path, is_dir)
| https://github.com/iterative/dvc/issues/4985 | dvc status -v
2020-11-28 16:41:28,063 DEBUG: Check for update is enabled.
2020-11-28 16:41:28,069 DEBUG: fetched: [(3,)]
2020-11-28 16:41:28,073 DEBUG: fetched: [(1404595,)]
2020-11-28 16:41:28,154 ERROR: Path 'fms_unit.csv' is ignored by
.dvcignore:1:/*
------------------------------------------------------------
Trac... | dvc.output.base.OutputIsIgnoredError |
def ignore(self, path, is_dir):
def matches(pattern, path, is_dir) -> bool:
matches_ = bool(pattern.match(path))
if is_dir:
matches_ |= bool(pattern.match(f"{path}/"))
return matches_
result = False
for ignore, pattern in self.ignore_spec[::-1]:
if matches(pat... | def ignore(self, path, is_dir):
result = False
if is_dir:
path_dir = f"{path}/"
for ignore, pattern in self.ignore_spec:
if pattern.match(path) or pattern.match(path_dir):
result = ignore
else:
for ignore, pattern in self.ignore_spec:
if patter... | https://github.com/iterative/dvc/issues/4985 | dvc status -v
2020-11-28 16:41:28,063 DEBUG: Check for update is enabled.
2020-11-28 16:41:28,069 DEBUG: fetched: [(3,)]
2020-11-28 16:41:28,073 DEBUG: fetched: [(1404595,)]
2020-11-28 16:41:28,154 ERROR: Path 'fms_unit.csv' is ignored by
.dvcignore:1:/*
------------------------------------------------------------
Trac... | dvc.output.base.OutputIsIgnoredError |
def _ignore_details(self, path, is_dir: bool):
result = []
for (regex, _), pattern_info in list(
zip(self.regex_pattern_list, self.pattern_list)
):
# skip system pattern
if not pattern_info.file_info:
continue
regex = re.compile(regex)
matches = bool(reg... | def _ignore_details(self, path, is_dir):
result = []
for ignore, pattern in zip(self.regex_pattern_list, self.pattern_list):
regex = re.compile(ignore[0])
# skip system pattern
if not pattern.file_info:
continue
if is_dir:
path_dir = f"{path}/"
... | https://github.com/iterative/dvc/issues/4985 | dvc status -v
2020-11-28 16:41:28,063 DEBUG: Check for update is enabled.
2020-11-28 16:41:28,069 DEBUG: fetched: [(3,)]
2020-11-28 16:41:28,073 DEBUG: fetched: [(1404595,)]
2020-11-28 16:41:28,154 ERROR: Path 'fms_unit.csv' is ignored by
.dvcignore:1:/*
------------------------------------------------------------
Trac... | dvc.output.base.OutputIsIgnoredError |
def check_ignore(self, target):
# NOTE: can only be used in `dvc check-ignore`, see
# https://github.com/iterative/dvc/issues/5046
full_target = os.path.abspath(target)
if not self._outside_repo(full_target):
dirname, basename = os.path.split(os.path.normpath(full_target))
pattern = self... | def check_ignore(self, target):
full_target = os.path.abspath(target)
if not self._outside_repo(full_target):
dirname, basename = os.path.split(os.path.normpath(full_target))
pattern = self._get_trie_pattern(dirname)
if pattern:
matches = pattern.match_details(
... | https://github.com/iterative/dvc/issues/4985 | dvc status -v
2020-11-28 16:41:28,063 DEBUG: Check for update is enabled.
2020-11-28 16:41:28,069 DEBUG: fetched: [(3,)]
2020-11-28 16:41:28,073 DEBUG: fetched: [(1404595,)]
2020-11-28 16:41:28,154 ERROR: Path 'fms_unit.csv' is ignored by
.dvcignore:1:/*
------------------------------------------------------------
Trac... | dvc.output.base.OutputIsIgnoredError |
def is_ignored(self, path):
# NOTE: can't use self.check_ignore(path).match for now, see
# https://github.com/iterative/dvc/issues/4555
if os.path.isfile(path):
return self.is_ignored_file(path)
if os.path.isdir(path):
return self.is_ignored_dir(path)
return self.is_ignored_file(path... | def is_ignored(self, path):
# NOTE: can't use self.check_ignore(path).match for now, see
# https://github.com/iterative/dvc/issues/4555
return self.is_ignored_dir(path) or self.is_ignored_file(path)
| https://github.com/iterative/dvc/issues/4985 | dvc status -v
2020-11-28 16:41:28,063 DEBUG: Check for update is enabled.
2020-11-28 16:41:28,069 DEBUG: fetched: [(3,)]
2020-11-28 16:41:28,073 DEBUG: fetched: [(1404595,)]
2020-11-28 16:41:28,154 ERROR: Path 'fms_unit.csv' is ignored by
.dvcignore:1:/*
------------------------------------------------------------
Trac... | dvc.output.base.OutputIsIgnoredError |
def _validate_output_path(cls, path, stage=None):
from dvc.dvcfile import is_valid_filename
if is_valid_filename(path):
raise cls.IsStageFileError(path)
if stage:
abs_path = os.path.join(stage.wdir, path)
if stage.repo.tree.dvcignore.is_ignored(abs_path):
check = stage.... | def _validate_output_path(cls, path, stage=None):
from dvc.dvcfile import is_valid_filename
if is_valid_filename(path):
raise cls.IsStageFileError(path)
if stage:
check = stage.repo.tree.dvcignore.check_ignore(path)
if check.match:
raise cls.IsIgnoredError(check)
| https://github.com/iterative/dvc/issues/4985 | dvc status -v
2020-11-28 16:41:28,063 DEBUG: Check for update is enabled.
2020-11-28 16:41:28,069 DEBUG: fetched: [(3,)]
2020-11-28 16:41:28,073 DEBUG: fetched: [(1404595,)]
2020-11-28 16:41:28,154 ERROR: Path 'fms_unit.csv' is ignored by
.dvcignore:1:/*
------------------------------------------------------------
Trac... | dvc.output.base.OutputIsIgnoredError |
def _filter_missing(repo, paths):
repo_tree = RepoTree(repo, stream=True)
for path in paths:
try:
metadata = repo_tree.metadata(path)
if metadata.is_dvc:
out = metadata.outs[0]
if out.status().get(str(out)) == "not in cache":
yi... | def _filter_missing(repo, paths):
repo_tree = RepoTree(repo, stream=True)
for path in paths:
metadata = repo_tree.metadata(path)
if metadata.is_dvc:
out = metadata.outs[0]
if out.status().get(str(out)) == "not in cache":
yield path
| https://github.com/iterative/dvc/issues/5170 | $ git status ⏎
On branch master
Changes not staged for commit:
deleted: .gitignore
deleted: foo.txt.dvc
no changes added to commit
$ dvc diff -v
2020-12-28 15:43:46,270 DEBUG: Check for update is ena... | FileNotFoundError |
def __init__(self, iterator): # pylint: disable=super-init-not-called
self.iterator = iterator
self.leftover = b""
| def __init__(self, iterator): # pylint: disable=super-init-not-called
self.iterator = iterator
self.leftover = None
| https://github.com/iterative/dvc/issues/5021 | with dvc.api.open("model.save", mode="rb") as f:
...: x = joblib.load(f)
...:
---------------------------------------------------------------------------
UnsupportedOperation Traceback (most recent call last)
<ipython-input-36-5d9cb3fe0cb1> in <module>
1 with dvc.api.open("model.save", mode="rb... | RuntimeError |
def read1(self, n=-1):
try:
chunk = self.leftover or next(self.iterator)
except StopIteration:
return b""
# Return an arbitrary number or bytes
if n <= 0:
self.leftover = b""
return chunk
output, self.leftover = chunk[:n], chunk[n:]
return output
| def read1(self, n=-1):
try:
chunk = self.leftover or next(self.iterator)
except StopIteration:
return b""
# Return an arbitrary number or bytes
if n <= 0:
self.leftover = None
return chunk
output, self.leftover = chunk[:n], chunk[n:]
return output
| https://github.com/iterative/dvc/issues/5021 | with dvc.api.open("model.save", mode="rb") as f:
...: x = joblib.load(f)
...:
---------------------------------------------------------------------------
UnsupportedOperation Traceback (most recent call last)
<ipython-input-36-5d9cb3fe0cb1> in <module>
1 with dvc.api.open("model.save", mode="rb... | RuntimeError |
def commit(
cls,
scm: "Git",
exp_hash: str,
exp_name: Optional[str] = None,
force: bool = False,
checkpoint: bool = False,
):
"""Commit stages as an experiment and return the commit SHA."""
rev = scm.get_rev()
if not scm.is_dirty(untracked_files=True):
logger.debug("No change... | def commit(
cls,
scm: "Git",
exp_hash: str,
exp_name: Optional[str] = None,
force: bool = False,
checkpoint: bool = False,
):
"""Commit stages as an experiment and return the commit SHA."""
rev = scm.get_rev()
if not scm.is_dirty(untracked_files=True):
logger.debug("No change... | https://github.com/iterative/dvc/issues/5076 | Traceback (most recent call last):
File "/usr/lib64/python3.7/concurrent/futures/process.py", line 205, in _sendback_result
exception=exception))
File "/usr/lib64/python3.7/multiprocessing/queues.py", line 358, in put
obj = _ForkingPickler.dumps(obj)
File "/usr/lib64/python3.7/multiprocessing/reduction.py", line 51, in... | AttributeError |
def commit(self, msg: str, no_verify: bool = False):
pass
| def commit(self, msg: str):
pass
| https://github.com/iterative/dvc/issues/5076 | Traceback (most recent call last):
File "/usr/lib64/python3.7/concurrent/futures/process.py", line 205, in _sendback_result
exception=exception))
File "/usr/lib64/python3.7/multiprocessing/queues.py", line 358, in put
obj = _ForkingPickler.dumps(obj)
File "/usr/lib64/python3.7/multiprocessing/reduction.py", line 51, in... | AttributeError |
def commit(self, msg: str, no_verify: bool = False):
from dulwich.errors import CommitError
from dulwich.porcelain import commit
try:
commit(self.root_dir, message=msg, no_verify=no_verify)
except CommitError as exc:
raise SCMError("Git commit failed") from exc
| def commit(self, msg: str):
from dulwich.porcelain import commit
commit(self.root_dir, message=msg)
| https://github.com/iterative/dvc/issues/5076 | Traceback (most recent call last):
File "/usr/lib64/python3.7/concurrent/futures/process.py", line 205, in _sendback_result
exception=exception))
File "/usr/lib64/python3.7/multiprocessing/queues.py", line 358, in put
obj = _ForkingPickler.dumps(obj)
File "/usr/lib64/python3.7/multiprocessing/reduction.py", line 51, in... | AttributeError |
def commit(self, msg: str, no_verify: bool = False):
from git.exc import HookExecutionError
try:
self.repo.index.commit(msg, skip_hooks=no_verify)
except HookExecutionError as exc:
raise SCMError("Git pre-commit hook failed") from exc
| def commit(self, msg: str):
self.repo.index.commit(msg)
| https://github.com/iterative/dvc/issues/5076 | Traceback (most recent call last):
File "/usr/lib64/python3.7/concurrent/futures/process.py", line 205, in _sendback_result
exception=exception))
File "/usr/lib64/python3.7/multiprocessing/queues.py", line 358, in put
obj = _ForkingPickler.dumps(obj)
File "/usr/lib64/python3.7/multiprocessing/reduction.py", line 51, in... | AttributeError |
def commit(self, msg: str, no_verify: bool = False):
raise NotImplementedError
| def commit(self, msg: str):
raise NotImplementedError
| https://github.com/iterative/dvc/issues/5076 | Traceback (most recent call last):
File "/usr/lib64/python3.7/concurrent/futures/process.py", line 205, in _sendback_result
exception=exception))
File "/usr/lib64/python3.7/multiprocessing/queues.py", line 358, in put
obj = _ForkingPickler.dumps(obj)
File "/usr/lib64/python3.7/multiprocessing/reduction.py", line 51, in... | AttributeError |
def get_url(url, out=None):
out = resolve_output(url, out)
if os.path.exists(url):
url = os.path.abspath(url)
out = os.path.abspath(out)
(dep,) = dependency.loads_from(None, [url])
(out,) = output.loads_from(None, [out], use_cache=False)
if not dep.exists:
raise dep.DoesNotExi... | def get_url(url, out=None):
out = resolve_output(url, out)
if os.path.exists(url):
url = os.path.abspath(url)
out = os.path.abspath(out)
(dep,) = dependency.loads_from(None, [url])
(out,) = output.loads_from(None, [out], use_cache=False)
if not dep.exists:
raise dep.DoesNotExi... | https://github.com/iterative/dvc/issues/5069 | 2020-12-09 12:24:32,622 DEBUG: Downloading 's3://dvc-temp/ivan/docs/README' to 'docs/docs/README'
2020-12-09 12:24:32,624 DEBUG: Downloading 's3://dvc-temp/ivan/docs/build/doctrees/filelist.doctree' to 'docs/docs/build/doctrees/filelist.doctree'
2020-12-09 12:24:32,624 DEBUG: Downloading 's3://dvc-temp/ivan/docs/build/... | AttributeError |
def reproduce(
self: "Repo",
targets=None,
recursive=False,
pipeline=False,
all_pipelines=False,
**kwargs,
):
glob = kwargs.pop("glob", False)
accept_group = not glob
if isinstance(targets, str):
targets = [targets]
if not all_pipelines and not targets:
from dvc... | def reproduce(
self: "Repo",
targets=None,
recursive=False,
pipeline=False,
all_pipelines=False,
**kwargs,
):
glob = kwargs.pop("glob", False)
accept_group = not glob
if isinstance(targets, str):
targets = [targets]
if not all_pipelines and targets is None:
from... | https://github.com/iterative/dvc/issues/4893 | 2020-11-12 19:17:45,465 DEBUG: No lock entry found for 'bash_projects/TDNNF_child_EN/dvc.yaml:create_hires_feats_train'
2020-11-12 19:17:45,974 DEBUG: fetched: [(412119,)]
2020-11-12 19:17:45,978 ERROR: unexpected error - nbunch is not a node or a sequence of nodes.
-----------------------------------------------------... | TypeError |
def _reproduce_stages(
G, stages, downstream=False, single_item=False, on_unchanged=None, **kwargs
):
r"""Derive the evaluation of the given node for the given graph.
When you _reproduce a stage_, you want to _evaluate the descendants_
to know if it make sense to _recompute_ it. A post-ordered search
... | def _reproduce_stages(
G, stages, downstream=False, single_item=False, on_unchanged=None, **kwargs
):
r"""Derive the evaluation of the given node for the given graph.
When you _reproduce a stage_, you want to _evaluate the descendants_
to know if it make sense to _recompute_ it. A post-ordered search
... | https://github.com/iterative/dvc/issues/4893 | 2020-11-12 19:17:45,465 DEBUG: No lock entry found for 'bash_projects/TDNNF_child_EN/dvc.yaml:create_hires_feats_train'
2020-11-12 19:17:45,974 DEBUG: fetched: [(412119,)]
2020-11-12 19:17:45,978 ERROR: unexpected error - nbunch is not a node or a sequence of nodes.
-----------------------------------------------------... | TypeError |
def _update_params(self, params: dict):
"""Update experiment params files with the specified values."""
from benedict import benedict
from dvc.utils.serialize import MODIFIERS
logger.debug("Using experiment params '%s'", params)
for params_fname in params:
path = PathInfo(params_fname)
... | def _update_params(self, params: dict):
"""Update experiment params files with the specified values."""
from benedict import benedict
from dvc.utils.serialize import MODIFIERS
logger.debug("Using experiment params '%s'", params)
for params_fname in params:
path = PathInfo(self.repo.root_d... | https://github.com/iterative/dvc/issues/4969 | Adding '.dvc/config.local' to '.dvc/.gitignore'.
Adding '.dvc/tmp' to '.dvc/.gitignore'.
Adding '.dvc/experiments' to '.dvc/.gitignore'.
Adding '.dvc/cache' to '.dvc/.gitignore'.
Check for update is enabled.
assuming default target 'dvc.yaml'.
fetched: [(3,)]
Checking out experiment commit 'e6a4d8123aebe35a19b9e4544e21... | FileNotFoundError |
def _reproduce(
self, executors: dict, jobs: Optional[int] = 1
) -> Mapping[str, Mapping[str, str]]:
"""Run dvc repro for the specified BaseExecutors in parallel.
Returns:
dict mapping stash revs to the successfully executed experiments
for each stash rev.
"""
result: Dict[str, Dict... | def _reproduce(
self, executors: dict, jobs: Optional[int] = 1
) -> Mapping[str, Mapping[str, str]]:
"""Run dvc repro for the specified BaseExecutors in parallel.
Returns:
dict mapping stash revs to the successfully executed experiments
for each stash rev.
"""
result: Dict[str, Dict... | https://github.com/iterative/dvc/issues/4969 | Adding '.dvc/config.local' to '.dvc/.gitignore'.
Adding '.dvc/tmp' to '.dvc/.gitignore'.
Adding '.dvc/experiments' to '.dvc/.gitignore'.
Adding '.dvc/cache' to '.dvc/.gitignore'.
Check for update is enabled.
assuming default target 'dvc.yaml'.
fetched: [(3,)]
Checking out experiment commit 'e6a4d8123aebe35a19b9e4544e21... | FileNotFoundError |
def reproduce(
cls,
dvc_dir: str,
queue: "Queue",
rev: str,
rel_cwd: Optional[str] = None,
name: Optional[str] = None,
log_level: Optional[int] = None,
) -> Tuple[Optional[str], bool]:
"""Run dvc repro and return the result.
Returns tuple of (exp_hash, force) where exp_hash is the e... | def reproduce(
cls,
dvc_dir: str,
queue: "Queue",
rev: str,
cwd: Optional[str] = None,
name: Optional[str] = None,
) -> Tuple[Optional[str], bool]:
"""Run dvc repro and return the result.
Returns tuple of (exp_hash, force) where exp_hash is the experiment
hash (or None on error)... | https://github.com/iterative/dvc/issues/4969 | Adding '.dvc/config.local' to '.dvc/.gitignore'.
Adding '.dvc/tmp' to '.dvc/.gitignore'.
Adding '.dvc/experiments' to '.dvc/.gitignore'.
Adding '.dvc/cache' to '.dvc/.gitignore'.
Check for update is enabled.
assuming default target 'dvc.yaml'.
fetched: [(3,)]
Checking out experiment commit 'e6a4d8123aebe35a19b9e4544e21... | FileNotFoundError |
def _reproduce_stage(stage, **kwargs):
def _run_callback(repro_callback):
_dump_stage(stage)
_track_stage(stage)
repro_callback([stage])
checkpoint_func = kwargs.pop("checkpoint_func", None)
if stage.is_checkpoint:
if checkpoint_func:
kwargs["checkpoint_func"] = ... | def _reproduce_stage(stage, **kwargs):
def _run_callback(repro_callback):
_dump_stage(stage)
repro_callback([stage])
checkpoint_func = kwargs.pop("checkpoint_func", None)
if stage.is_checkpoint:
if checkpoint_func:
kwargs["checkpoint_func"] = partial(_run_callback, check... | https://github.com/iterative/dvc/issues/4969 | Adding '.dvc/config.local' to '.dvc/.gitignore'.
Adding '.dvc/tmp' to '.dvc/.gitignore'.
Adding '.dvc/experiments' to '.dvc/.gitignore'.
Adding '.dvc/cache' to '.dvc/.gitignore'.
Check for update is enabled.
assuming default target 'dvc.yaml'.
fetched: [(3,)]
Checking out experiment commit 'e6a4d8123aebe35a19b9e4544e21... | FileNotFoundError |
def _run_callback(repro_callback):
_dump_stage(stage)
_track_stage(stage)
repro_callback([stage])
| def _run_callback(repro_callback):
_dump_stage(stage)
repro_callback([stage])
| https://github.com/iterative/dvc/issues/4969 | Adding '.dvc/config.local' to '.dvc/.gitignore'.
Adding '.dvc/tmp' to '.dvc/.gitignore'.
Adding '.dvc/experiments' to '.dvc/.gitignore'.
Adding '.dvc/cache' to '.dvc/.gitignore'.
Check for update is enabled.
assuming default target 'dvc.yaml'.
fetched: [(3,)]
Checking out experiment commit 'e6a4d8123aebe35a19b9e4544e21... | FileNotFoundError |
def __init__( # pylint:disable=W0231
self, root_dir=os.curdir, search_parent_directories=True
):
from dulwich.errors import NotGitRepository
from dulwich.repo import Repo
try:
if search_parent_directories:
self.repo = Repo.discover(start=root_dir)
else:
self.rep... | def __init__( # pylint:disable=W0231
self, root_dir=os.curdir, search_parent_directories=True
):
from dulwich.errors import NotGitRepository
from dulwich.repo import Repo
try:
if search_parent_directories:
self.repo = Repo.discover(start=root_dir)
else:
self.rep... | https://github.com/iterative/dvc/issues/4969 | Adding '.dvc/config.local' to '.dvc/.gitignore'.
Adding '.dvc/tmp' to '.dvc/.gitignore'.
Adding '.dvc/experiments' to '.dvc/.gitignore'.
Adding '.dvc/cache' to '.dvc/.gitignore'.
Check for update is enabled.
assuming default target 'dvc.yaml'.
fetched: [(3,)]
Checking out experiment commit 'e6a4d8123aebe35a19b9e4544e21... | FileNotFoundError |
def add(self, paths: Iterable[str]):
from dvc.utils.fs import walk_files
if isinstance(paths, str):
paths = [paths]
files = []
for path in paths:
if not os.path.isabs(path) and self._submodules:
# NOTE: If path is inside a submodule, Dulwich expects the
# staged... | def add(self, paths: Iterable[str]):
from dvc.utils.fs import walk_files
if isinstance(paths, str):
paths = [paths]
files = []
for path in paths:
if not os.path.isabs(path):
path = os.path.join(self.root_dir, path)
if os.path.isdir(path):
files.extend(wa... | https://github.com/iterative/dvc/issues/4969 | Adding '.dvc/config.local' to '.dvc/.gitignore'.
Adding '.dvc/tmp' to '.dvc/.gitignore'.
Adding '.dvc/experiments' to '.dvc/.gitignore'.
Adding '.dvc/cache' to '.dvc/.gitignore'.
Check for update is enabled.
assuming default target 'dvc.yaml'.
fetched: [(3,)]
Checking out experiment commit 'e6a4d8123aebe35a19b9e4544e21... | FileNotFoundError |
def is_tracked(self, path: str) -> bool:
rel = PathInfo(path).relative_to(self.root_dir).as_posix().encode()
rel_dir = rel + b"/"
for path in self.repo.open_index():
if path == rel or path.startswith(rel_dir):
return True
return False
| def is_tracked(self, path: str) -> bool:
from dvc.path_info import PathInfo
rel = PathInfo(path).relative_to(self.root_dir).as_posix().encode()
rel_dir = rel + b"/"
for path in self.repo.open_index():
if path == rel or path.startswith(rel_dir):
return True
return False
| https://github.com/iterative/dvc/issues/4969 | Adding '.dvc/config.local' to '.dvc/.gitignore'.
Adding '.dvc/tmp' to '.dvc/.gitignore'.
Adding '.dvc/experiments' to '.dvc/.gitignore'.
Adding '.dvc/cache' to '.dvc/.gitignore'.
Check for update is enabled.
assuming default target 'dvc.yaml'.
fetched: [(3,)]
Checking out experiment commit 'e6a4d8123aebe35a19b9e4544e21... | FileNotFoundError |
def _run_callback(stage, callback_func):
stage.save(allow_missing=True)
stage.commit(allow_missing=True)
logger.debug("Running checkpoint callback for stage '%s'", stage)
callback_func()
| def _run_callback(stage, callback_func):
stage.save(allow_missing=True)
stage.commit(allow_missing=True)
for out in stage.outs:
if not out.use_scm_ignore and out.is_in_repo:
stage.repo.scm.track_file(os.fspath(out.path_info))
stage.repo.scm.track_changed_files()
logger.debug("Run... | https://github.com/iterative/dvc/issues/4969 | Adding '.dvc/config.local' to '.dvc/.gitignore'.
Adding '.dvc/tmp' to '.dvc/.gitignore'.
Adding '.dvc/experiments' to '.dvc/.gitignore'.
Adding '.dvc/cache' to '.dvc/.gitignore'.
Check for update is enabled.
assuming default target 'dvc.yaml'.
fetched: [(3,)]
Checking out experiment commit 'e6a4d8123aebe35a19b9e4544e21... | FileNotFoundError |
def _reflink_darwin(src, dst):
import ctypes
LIBC = "libc.dylib"
LIBC_FALLBACK = "/usr/lib/libSystem.dylib"
try:
clib = ctypes.CDLL(LIBC)
except OSError as exc:
logger.debug(
"unable to access '{}' (errno '{}'). Falling back to '{}'.".format(
LIBC, exc.er... | def _reflink_darwin(src, dst):
import ctypes
LIBC = "libc.dylib"
LIBC_FALLBACK = "/usr/lib/libSystem.dylib"
try:
clib = ctypes.CDLL(LIBC)
except OSError as exc:
logger.debug(
"unable to access '{}' (errno '{}'). Falling back to '{}'.".format(
LIBC, exc.er... | https://github.com/iterative/dvc/issues/5083 | 2020-12-11 16:32:04,319 DEBUG: 'aug_set/annotations/sydney-australia-–-january-–-red-bull-energy-drink-mini-cooper-publicity-car-can-red-bull-drink-behind-used-123644712-0.json' doesn't exist.
2020-12-11 16:32:04,321 DEBUG: fetched: [(92173,)]
4:33
2020-12-11 16:32:04,325 ERROR: unexpected error - 'utf-8' codec can... | UnicodeEncodeError |
def _filter_names(
names: Iterable,
label: str,
include: Optional[Iterable],
exclude: Optional[Iterable],
):
if include and exclude:
intersection = set(include) & set(exclude)
if intersection:
values = ", ".join(intersection)
raise InvalidArgumentError(
... | def _filter_names(
names: Iterable,
label: str,
include: Optional[Iterable],
exclude: Optional[Iterable],
):
if include and exclude:
intersection = set(include) & set(exclude)
if intersection:
values = ", ".join(intersection)
raise InvalidArgumentError(
... | https://github.com/iterative/dvc/issues/4935 | dvc exp show --exclude-metrics train -v
2020-11-22 14:31:39,852 DEBUG: Check for update is enabled.
2020-11-22 14:31:39,880 DEBUG: fetched: [(3,)]
2020-11-22 14:31:41,553 DEBUG: fetched: [(12331,)]
2020-11-22 14:31:42,627 ERROR: unexpected error - 'collections.OrderedDict' object has no attribute 'difference_update'
--... | AttributeError |
def init(root_dir=os.curdir, no_scm=False, force=False, subdir=False):
"""
Creates an empty repo on the given directory -- basically a
`.dvc` directory with subdirectories for configuration and cache.
It should be tracked by a SCM or use the `--no-scm` flag.
If the given directory is not empty, yo... | def init(root_dir=os.curdir, no_scm=False, force=False, subdir=False):
"""
Creates an empty repo on the given directory -- basically a
`.dvc` directory with subdirectories for configuration and cache.
It should be tracked by a SCM or use the `--no-scm` flag.
If the given directory is not empty, yo... | https://github.com/iterative/dvc/issues/3738 | Traceback (most recent call last):
File "dvc\main.py", line 49, in main
File "dvc\command\init.py", line 21, in run
File "dvc\repo__init.py", line 155, in init
File "dvc\repo\init.py", line 108, in init
File "dvc\scm\git__init.py", line 194, in add
File "site-packages\git\index\base.py", line 740, in add
File "site-pac... | FileNotFoundError |
def ignore(self, path):
entry, gitignore = self._get_gitignore(path)
if self.is_ignored(path):
return
msg = "Adding '{}' to '{}'.".format(relpath(path), relpath(gitignore))
logger.debug(msg)
self._add_entry_to_gitignore(entry, gitignore)
self.track_file(relpath(gitignore))
self.... | def ignore(self, path):
entry, gitignore = self._get_gitignore(path)
if self._ignored(path):
return
msg = "Adding '{}' to '{}'.".format(relpath(path), relpath(gitignore))
logger.debug(msg)
self._add_entry_to_gitignore(entry, gitignore)
self.track_file(relpath(gitignore))
self.ig... | https://github.com/iterative/dvc/issues/3738 | Traceback (most recent call last):
File "dvc\main.py", line 49, in main
File "dvc\command\init.py", line 21, in run
File "dvc\repo__init.py", line 155, in init
File "dvc\repo\init.py", line 108, in init
File "dvc\scm\git__init.py", line 194, in add
File "site-packages\git\index\base.py", line 740, in add
File "site-pac... | FileNotFoundError |
def checkout(
self,
path_info,
hash_info,
force=False,
progress_callback=None,
relink=False,
filter_info=None,
quiet=False,
):
if path_info.scheme not in ["local", self.tree.scheme]:
raise NotImplementedError
failed = None
skip = False
if not hash_info:
i... | def checkout(
self,
path_info,
hash_info,
force=False,
progress_callback=None,
relink=False,
filter_info=None,
):
if path_info.scheme not in ["local", self.tree.scheme]:
raise NotImplementedError
failed = None
skip = False
if not hash_info:
logger.warning(
... | https://github.com/iterative/dvc/issues/4777 | ❯ dvc exp run --continue -v
...
2020-10-23 16:36:29,034 DEBUG: Commit to current experiment branch
2020-10-23 16:36:29,118 DEBUG: Checking out experiment commit 'd5dbcff520d30b5d92a863049f7259044a145a28'
2020-10-23 16:36:29,148 DEBUG: Patching local workspace
2020-10-23 16:36:29,154 DEBUG: Removing '/var/folders/s_/j8c... | git.exc.GitCommandError |
def checkout(
self,
force=False,
progress_callback=None,
relink=False,
filter_info=None,
allow_missing=False,
**kwargs,
):
if not self.use_cache:
if progress_callback:
progress_callback(str(self.path_info), self.get_files_number(filter_info))
return None
... | def checkout(
self,
force=False,
progress_callback=None,
relink=False,
filter_info=None,
allow_missing=False,
):
if not self.use_cache:
if progress_callback:
progress_callback(str(self.path_info), self.get_files_number(filter_info))
return None
try:
r... | https://github.com/iterative/dvc/issues/4777 | ❯ dvc exp run --continue -v
...
2020-10-23 16:36:29,034 DEBUG: Commit to current experiment branch
2020-10-23 16:36:29,118 DEBUG: Checking out experiment commit 'd5dbcff520d30b5d92a863049f7259044a145a28'
2020-10-23 16:36:29,148 DEBUG: Patching local workspace
2020-10-23 16:36:29,154 DEBUG: Removing '/var/folders/s_/j8c... | git.exc.GitCommandError |
def checkout(
self,
targets=None,
with_deps=False,
force=False,
relink=False,
recursive=False,
allow_missing=False,
**kwargs,
):
from dvc.stage.exceptions import (
StageFileBadNameError,
StageFileDoesNotExistError,
)
unused = []
stats = {
"added":... | def checkout(
self,
targets=None,
with_deps=False,
force=False,
relink=False,
recursive=False,
allow_missing=False,
):
from dvc.stage.exceptions import (
StageFileBadNameError,
StageFileDoesNotExistError,
)
unused = []
stats = {
"added": [],
"... | https://github.com/iterative/dvc/issues/4777 | ❯ dvc exp run --continue -v
...
2020-10-23 16:36:29,034 DEBUG: Commit to current experiment branch
2020-10-23 16:36:29,118 DEBUG: Checking out experiment commit 'd5dbcff520d30b5d92a863049f7259044a145a28'
2020-10-23 16:36:29,148 DEBUG: Patching local workspace
2020-10-23 16:36:29,154 DEBUG: Removing '/var/folders/s_/j8c... | git.exc.GitCommandError |
def reproduce_one(self, queue=False, **kwargs):
"""Reproduce and checkout a single experiment."""
checkpoint = kwargs.get("checkpoint", False)
stash_rev = self.new(**kwargs)
if queue:
logger.info("Queued experiment '%s' for future execution.", stash_rev[:7])
return [stash_rev]
result... | def reproduce_one(self, queue=False, **kwargs):
"""Reproduce and checkout a single experiment."""
checkpoint = kwargs.get("checkpoint", False)
stash_rev = self.new(**kwargs)
if queue:
logger.info("Queued experiment '%s' for future execution.", stash_rev[:7])
return [stash_rev]
result... | https://github.com/iterative/dvc/issues/4777 | ❯ dvc exp run --continue -v
...
2020-10-23 16:36:29,034 DEBUG: Commit to current experiment branch
2020-10-23 16:36:29,118 DEBUG: Checking out experiment commit 'd5dbcff520d30b5d92a863049f7259044a145a28'
2020-10-23 16:36:29,148 DEBUG: Patching local workspace
2020-10-23 16:36:29,154 DEBUG: Removing '/var/folders/s_/j8c... | git.exc.GitCommandError |
def checkout_exp(self, rev, **kwargs):
"""Checkout an experiment to the user's workspace."""
from git.exc import GitCommandError
from dvc.repo.checkout import checkout as dvc_checkout
baseline_rev = self._check_baseline(rev)
self._scm_checkout(rev)
branch = self._get_branch_containing(rev)
... | def checkout_exp(self, rev, allow_missing=False):
"""Checkout an experiment to the user's workspace."""
from git.exc import GitCommandError
from dvc.repo.checkout import checkout as dvc_checkout
baseline_rev = self._check_baseline(rev)
self._scm_checkout(rev)
tmp = tempfile.NamedTemporaryFile... | https://github.com/iterative/dvc/issues/4777 | ❯ dvc exp run --continue -v
...
2020-10-23 16:36:29,034 DEBUG: Commit to current experiment branch
2020-10-23 16:36:29,118 DEBUG: Checking out experiment commit 'd5dbcff520d30b5d92a863049f7259044a145a28'
2020-10-23 16:36:29,148 DEBUG: Patching local workspace
2020-10-23 16:36:29,154 DEBUG: Removing '/var/folders/s_/j8c... | git.exc.GitCommandError |
def _get_branch_containing(self, rev):
from git.exc import GitCommandError
try:
names = self.scm.repo.git.branch(contains=rev).strip().splitlines()
if (
names
and self.scm.repo.head.is_detached
and names[0].startswith("* (HEAD detached")
):
... | def _get_branch_containing(self, rev):
from git.exc import GitCommandError
if self.scm.repo.head.is_detached:
self._checkout_default_branch()
try:
names = self.scm.repo.git.branch(contains=rev).strip().splitlines()
if not names:
return None
if len(names) > 1:
... | https://github.com/iterative/dvc/issues/4777 | ❯ dvc exp run --continue -v
...
2020-10-23 16:36:29,034 DEBUG: Commit to current experiment branch
2020-10-23 16:36:29,118 DEBUG: Checking out experiment commit 'd5dbcff520d30b5d92a863049f7259044a145a28'
2020-10-23 16:36:29,148 DEBUG: Patching local workspace
2020-10-23 16:36:29,154 DEBUG: Removing '/var/folders/s_/j8c... | git.exc.GitCommandError |
def reproduce(dvc_dir, cwd=None, **kwargs):
"""Run dvc repro and return the result."""
from dvc.repo import Repo
from dvc.repo.experiments import hash_exp
unchanged = []
def filter_pipeline(stages):
unchanged.extend(
[stage for stage in stages if isinstance(stage, PipelineStage... | def reproduce(dvc_dir, cwd=None, **kwargs):
"""Run dvc repro and return the result."""
from dvc.repo import Repo
from dvc.repo.experiments import hash_exp
unchanged = []
def filter_pipeline(stages):
unchanged.extend(
[stage for stage in stages if isinstance(stage, PipelineStage... | https://github.com/iterative/dvc/issues/4777 | ❯ dvc exp run --continue -v
...
2020-10-23 16:36:29,034 DEBUG: Commit to current experiment branch
2020-10-23 16:36:29,118 DEBUG: Checking out experiment commit 'd5dbcff520d30b5d92a863049f7259044a145a28'
2020-10-23 16:36:29,148 DEBUG: Patching local workspace
2020-10-23 16:36:29,154 DEBUG: Removing '/var/folders/s_/j8c... | git.exc.GitCommandError |
def _filter_missing(repo, paths):
repo_tree = RepoTree(repo, stream=True)
for path in paths:
metadata = repo_tree.metadata(path)
if metadata.is_dvc:
out = metadata.outs[0]
if out.status().get(str(out)) == "not in cache":
yield path
| def _filter_missing(repo, paths):
repo_tree = RepoTree(repo, stream=True)
for path in paths:
metadata = repo_tree.metadata(path)
if metadata.is_dvc:
out = metadata.outs[0]
if out.status()[str(out)] == "not in cache":
yield path
| https://github.com/iterative/dvc/issues/4825 | Traceback (most recent call last):
File "/home/ubuntu/.local/share/virtualenvs/speech-api-EI_ft4iY/lib/python3.7/site-packages/dvc/main.py", line 76, in main
ret = cmd.run()
File "/home/ubuntu/.local/share/virtualenvs/speech-api-EI_ft4iY/lib/python3.7/site-packages/dvc/command/diff.py", line 130, in run
diff = self.rep... | KeyError |
def _update_params(self, params: dict):
"""Update experiment params files with the specified values."""
from dvc.utils.serialize import MODIFIERS
logger.debug("Using experiment params '%s'", params)
# recursive dict update
def _update(dict_, other):
for key, value in other.items():
... | def _update_params(self, params: dict):
"""Update experiment params files with the specified values."""
from dvc.utils.serialize import MODIFIERS
logger.debug("Using experiment params '%s'", params)
# recursive dict update
def _update(dict_, other):
for key, value in other.items():
... | https://github.com/iterative/dvc/issues/4768 | 2020-10-21 16:59:00,192 ERROR: unexpected error - 'CommentedSeq' object has no attribute 'get'
------------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/dvc/main.py", line 76, in main
ret = cmd.run()
File "/usr/local/lib/python3.8/dist-p... | AttributeError |
def _update(dict_, other):
for key, value in other.items():
if isinstance(dict_, list) and key.isdigit():
key = int(key)
if isinstance(value, Mapping):
if isinstance(dict_, list):
fallback_value = dict_[key]
else:
fallback_value = d... | def _update(dict_, other):
for key, value in other.items():
if isinstance(value, Mapping):
dict_[key] = _update(dict_.get(key, {}), value)
else:
dict_[key] = value
return dict_
| https://github.com/iterative/dvc/issues/4768 | 2020-10-21 16:59:00,192 ERROR: unexpected error - 'CommentedSeq' object has no attribute 'get'
------------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/dvc/main.py", line 76, in main
ret = cmd.run()
File "/usr/local/lib/python3.8/dist-p... | AttributeError |
def md5(self, path):
"""
Use different md5 commands depending on the OS:
- Darwin's `md5` returns BSD-style checksums by default
- Linux's `md5sum` needs the `--tag` flag for a similar output
Example:
MD5 (foo.txt) = f3d220a856b52aabbf294351e8a24300
"""
path = shlex.quote(path... | def md5(self, path):
"""
Use different md5 commands depending on the OS:
- Darwin's `md5` returns BSD-style checksums by default
- Linux's `md5sum` needs the `--tag` flag for a similar output
Example:
MD5 (foo.txt) = f3d220a856b52aabbf294351e8a24300
"""
if self.uname == "Linux... | https://github.com/iterative/dvc/issues/4628 | 2020-09-28 15:53:35,511 ERROR: failed to import ssh://user@1.2.3.4/home/data/cana/ds30. You could also try downloading it manually, and adding it with `dvc add`. - ssh command 'md5sum /home/data/cana/ds30/cana-mucuna/class35_e2545053-f2c5-4108-9042-67244a94e267_p_['cana']_o_['cana', 'mucuna'].jpg' finished with non-zer... | dvc.tree.base.RemoteCmdError |
def copy(self, src, dest):
dest = shlex.quote(dest)
src = shlex.quote(src)
self.execute(f"cp {src} {dest}")
| def copy(self, src, dest):
self.execute(f"cp {src} {dest}")
| https://github.com/iterative/dvc/issues/4628 | 2020-09-28 15:53:35,511 ERROR: failed to import ssh://user@1.2.3.4/home/data/cana/ds30. You could also try downloading it manually, and adding it with `dvc add`. - ssh command 'md5sum /home/data/cana/ds30/cana-mucuna/class35_e2545053-f2c5-4108-9042-67244a94e267_p_['cana']_o_['cana', 'mucuna'].jpg' finished with non-zer... | dvc.tree.base.RemoteCmdError |
def reflink(self, src, dest):
dest = shlex.quote(dest)
src = shlex.quote(src)
if self.uname == "Linux":
return self.execute(f"cp --reflink {src} {dest}")
if self.uname == "Darwin":
return self.execute(f"cp -c {src} {dest}")
raise DvcException(f"'{self.uname}' is not supported as a ... | def reflink(self, src, dest):
if self.uname == "Linux":
return self.execute(f"cp --reflink {src} {dest}")
if self.uname == "Darwin":
return self.execute(f"cp -c {src} {dest}")
raise DvcException(f"'{self.uname}' is not supported as a SSH remote")
| https://github.com/iterative/dvc/issues/4628 | 2020-09-28 15:53:35,511 ERROR: failed to import ssh://user@1.2.3.4/home/data/cana/ds30. You could also try downloading it manually, and adding it with `dvc add`. - ssh command 'md5sum /home/data/cana/ds30/cana-mucuna/class35_e2545053-f2c5-4108-9042-67244a94e267_p_['cana']_o_['cana', 'mucuna'].jpg' finished with non-zer... | dvc.tree.base.RemoteCmdError |
def hardlink(self, src, dest):
dest = shlex.quote(dest)
src = shlex.quote(src)
self.execute(f"ln {src} {dest}")
| def hardlink(self, src, dest):
self.execute(f"ln {src} {dest}")
| https://github.com/iterative/dvc/issues/4628 | 2020-09-28 15:53:35,511 ERROR: failed to import ssh://user@1.2.3.4/home/data/cana/ds30. You could also try downloading it manually, and adding it with `dvc add`. - ssh command 'md5sum /home/data/cana/ds30/cana-mucuna/class35_e2545053-f2c5-4108-9042-67244a94e267_p_['cana']_o_['cana', 'mucuna'].jpg' finished with non-zer... | dvc.tree.base.RemoteCmdError |
def run(self):
indent = 1 if self.args.cloud else 0
try:
st = self.repo.status(
targets=self.args.targets,
jobs=self.args.jobs,
cloud=self.args.cloud,
remote=self.args.remote,
all_branches=self.args.all_branches,
all_tags=self.args.... | def run(self):
indent = 1 if self.args.cloud else 0
try:
st = self.repo.status(
targets=self.args.targets,
jobs=self.args.jobs,
cloud=self.args.cloud,
remote=self.args.remote,
all_branches=self.args.all_branches,
all_tags=self.args.... | https://github.com/iterative/dvc/issues/4664 | $ dvc metrics diff -v
2020-10-05 09:00:38,005 DEBUG: Check for update is enabled.
2020-10-05 09:00:38,039 DEBUG: fetched: [(3,)]
2020-10-05 09:00:38,048 DEBUG: fetched: [(682,)]
2020-10-05 09:00:38,049 ERROR: unexpected error - while constructing a mapping
in "<unicode string>", line 3, column 5
found duplicate key "me... | ruamel.yaml.constructor.DuplicateKeyError |
def parse_yaml(text, path, typ="safe"):
yaml = YAML(typ=typ)
try:
with reraise(_YAMLError, YAMLFileCorruptedError(path)):
return yaml.load(text) or {}
except DuplicateKeyError as exc:
# NOTE: unfortunately this one doesn't inherit from YAMLError, so we
# have to catch it ... | def parse_yaml(text, path, typ="safe"):
yaml = YAML(typ=typ)
with reraise(YAMLError, YAMLFileCorruptedError(path)):
return yaml.load(text) or {}
| https://github.com/iterative/dvc/issues/4664 | $ dvc metrics diff -v
2020-10-05 09:00:38,005 DEBUG: Check for update is enabled.
2020-10-05 09:00:38,039 DEBUG: fetched: [(3,)]
2020-10-05 09:00:38,048 DEBUG: fetched: [(682,)]
2020-10-05 09:00:38,049 ERROR: unexpected error - while constructing a mapping
in "<unicode string>", line 3, column 5
found duplicate key "me... | ruamel.yaml.constructor.DuplicateKeyError |
def main(argv=None): # noqa: C901
"""Run dvc CLI command.
Args:
argv: optional list of arguments to parse. sys.argv is used by default.
Returns:
int: command's return code.
"""
args = None
disable_other_loggers()
outerLogLevel = logger.level
try:
args = parse_... | def main(argv=None): # noqa: C901
"""Run dvc CLI command.
Args:
argv: optional list of arguments to parse. sys.argv is used by default.
Returns:
int: command's return code.
"""
args = None
disable_other_loggers()
outerLogLevel = logger.level
try:
args = parse_... | https://github.com/iterative/dvc/issues/4664 | $ dvc metrics diff -v
2020-10-05 09:00:38,005 DEBUG: Check for update is enabled.
2020-10-05 09:00:38,039 DEBUG: fetched: [(3,)]
2020-10-05 09:00:38,048 DEBUG: fetched: [(682,)]
2020-10-05 09:00:38,049 ERROR: unexpected error - while constructing a mapping
in "<unicode string>", line 3, column 5
found duplicate key "me... | ruamel.yaml.constructor.DuplicateKeyError |
def open_by_relpath(self, path, remote=None, mode="r", encoding=None):
"""Opens a specified resource as a file descriptor"""
tree = RepoTree(self, stream=True, subrepos=True)
path = PathInfo(self.root_dir) / path
try:
with self.state:
with tree.open(
path,
... | def open_by_relpath(self, path, remote=None, mode="r", encoding=None):
"""Opens a specified resource as a file descriptor"""
tree = RepoTree(self, stream=True, subrepos=True)
path = os.path.join(self.root_dir, path)
try:
with self.state:
with tree.open(
path,
... | https://github.com/iterative/dvc/issues/4650 | ---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
<ipython-input-x-xxxxxxxxxxxx> in <module>
----> 1 with open('test/foo') as file:
2 pass
3
.../python3.6/contextlib.py in __enter__(self)
79 def __enter__(self... | AssertionError |
def _get_granular_checksum(self, path_info: PathInfo, out: "BaseOutput", remote=None):
assert isinstance(path_info, PathInfo)
if not self.fetch and not self.stream:
raise FileNotFoundError
dir_cache = out.get_dir_cache(remote=remote)
for entry in dir_cache:
entry_relpath = entry[out.tree... | def _get_granular_checksum(self, path, out, remote=None):
assert isinstance(path, PathInfo)
if not self.fetch and not self.stream:
raise FileNotFoundError
dir_cache = out.get_dir_cache(remote=remote)
for entry in dir_cache:
entry_relpath = entry[out.tree.PARAM_RELPATH]
if os.name... | https://github.com/iterative/dvc/issues/4650 | ---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
<ipython-input-x-xxxxxxxxxxxx> in <module>
----> 1 with open('test/foo') as file:
2 pass
3
.../python3.6/contextlib.py in __enter__(self)
79 def __enter__(self... | AssertionError |
def open(self, path: PathInfo, mode="r", encoding="utf-8", remote=None): # pylint: disable=arguments-differ
try:
outs = self._find_outs(path, strict=False)
except OutputNotFoundError as exc:
raise FileNotFoundError from exc
if len(outs) != 1 or (outs[0].is_dir_checksum and path == outs[0].... | def open(self, path, mode="r", encoding="utf-8", remote=None): # pylint: disable=arguments-differ
try:
outs = self._find_outs(path, strict=False)
except OutputNotFoundError as exc:
raise FileNotFoundError from exc
if len(outs) != 1 or (outs[0].is_dir_checksum and path == outs[0].path_info)... | https://github.com/iterative/dvc/issues/4650 | ---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
<ipython-input-x-xxxxxxxxxxxx> in <module>
----> 1 with open('test/foo') as file:
2 pass
3
.../python3.6/contextlib.py in __enter__(self)
79 def __enter__(self... | AssertionError |
def open(self, path, mode="r", encoding="utf-8", **kwargs): # pylint: disable=arguments-differ
if "b" in mode:
encoding = None
tree, dvc_tree = self._get_tree_pair(path)
path_info = PathInfo(path)
try:
return tree.open(path_info, mode=mode, encoding=encoding)
except FileNotFoundErr... | def open(self, path, mode="r", encoding="utf-8", **kwargs): # pylint: disable=arguments-differ
if "b" in mode:
encoding = None
tree, dvc_tree = self._get_tree_pair(path)
try:
return tree.open(path, mode=mode, encoding=encoding)
except FileNotFoundError:
if not dvc_tree:
... | https://github.com/iterative/dvc/issues/4650 | ---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
<ipython-input-x-xxxxxxxxxxxx> in <module>
----> 1 with open('test/foo') as file:
2 pass
3
.../python3.6/contextlib.py in __enter__(self)
79 def __enter__(self... | AssertionError |
def brancher( # noqa: E302
self,
revs=None,
all_branches=False,
all_tags=False,
all_commits=False,
sha_only=False,
):
"""Generator that iterates over specified revisions.
Args:
revs (list): a list of revisions to iterate over.
all_branches (bool): iterate over all avail... | def brancher( # noqa: E302
self, revs=None, all_branches=False, all_tags=False, all_commits=False
):
"""Generator that iterates over specified revisions.
Args:
revs (list): a list of revisions to iterate over.
all_branches (bool): iterate over all available branches.
all_commits (b... | https://github.com/iterative/dvc/issues/4587 | dvc exp show -T -v
2020-09-21 17:33:07,541 DEBUG: Check for update is enabled.
2020-09-21 17:33:07,570 DEBUG: fetched: [(3,)]
2020-09-21 17:33:08,049 DEBUG: fetched: [(75,)]
2020-09-21 17:33:08,058 ERROR: failed to show experiments - unknown Git revision 'f97e3cca64d10c299f7e9e54dd22889c6ee7a1b4, decouple/base'
-------... | dvc.scm.base.RevError |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.