I'm not aware that I changed anything and am running Ubuntu 10.10. Mercurial had been working fine and then all of a sudden when I started pushing commits this morning I started receiving the following error:
** unknown exception encountered, details follow
** report bug details to http://mercurial.selenic.com/bts/
** or mercurial#selenic.com
** Python 2.6.6 (r266:84292, Sep 15 2010, 15:52:39) [GCC 4.4.5]
** Mercurial Distributed SCM (version 1.6.3)
** Extensions loaded: convert
Traceback (most recent call last):
File "/usr/bin/hg", line 27, in <module>
mercurial.dispatch.run()
File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 16, in run
sys.exit(dispatch(sys.argv[1:]))
File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 34, in dispatch
return _runcatch(u, args)
File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 54, in _runcatch
return _dispatch(ui, args)
File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 494, in _dispatch
cmdpats, cmdoptions)
File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 355, in runcommand
ret = _runcommand(ui, options, cmd, d)
File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 545, in _runcommand
return checkargs()
File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 499, in checkargs
return cmdfunc()
File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 492, in <lambda>
d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
File "/usr/lib/pymodules/python2.6/mercurial/util.py", line 420, in check
return func(*args, **kwargs)
File "/usr/lib/pymodules/python2.6/mercurial/commands.py", line 2855, in push
newbranch=opts.get('new_branch'))
File "/usr/lib/pymodules/python2.6/mercurial/localrepo.py", line 1227, in push
return self.push_unbundle(remote, force, revs, newbranch)
File "/usr/lib/pymodules/python2.6/mercurial/localrepo.py", line 1263, in push_unbundle
return remote.unbundle(cg, remote_heads, 'push')
File "/usr/lib/pymodules/python2.6/mercurial/httprepo.py", line 236, in unbundle
tempname = changegroup.writebundle(cg, None, type)
File "/usr/lib/pymodules/python2.6/mercurial/changegroup.py", line 106, in writebundle
for chunk in chunkiter(cg):
File "/usr/lib/pymodules/python2.6/mercurial/changegroup.py", line 31, in chunkiter
c = getchunk(source)
File "/usr/lib/pymodules/python2.6/mercurial/changegroup.py", line 14, in getchunk
d = source.read(4)
File "/usr/lib/pymodules/python2.6/mercurial/util.py", line 924, in read
for chunk in self.iter:
File "/usr/lib/pymodules/python2.6/mercurial/localrepo.py", line 1613, in gengroup
for chnk in filerevlog.group(nodeiter, lookup):
File "/usr/lib/pymodules/python2.6/mercurial/revlog.py", line 1196, in group
d = self.revdiff(a, b)
File "/usr/lib/pymodules/python2.6/mercurial/revlog.py", line 1005, in revdiff
return self._chunk(rev2)
File "/usr/lib/pymodules/python2.6/mercurial/revlog.py", line 997, in _chunk
return decompress(self._chunkraw(rev, rev))
File "/usr/lib/pymodules/python2.6/mercurial/revlog.py", line 112, in decompress
return _decompress(bin)
zlib.error: Error -5 while decompressing data: incomplete or truncated stream
I tried to Google parts of it, but I couldn't find anything relevant. Any ideas?
Thanks for looking. :)
I ran hg verify as Dan D. mentioned and ended up erasing my local repo and re-cloned it. This got me back on track.
This is a typical stacktrace from a corrupted server. The last (1.8) release helps having better error messages in that case.
Related
To get more hands-on experience I wanted to try a project word count.
Here is the sample data which I have.
The United Nations (UN) is an intergovernmental organisation
established on 24 October 1945 to promote international cooperation. A
replacement for the ineffective League of Nations, the organisation
was created following World War II to prevent another such conflict.
[...]
and i used the following python code to get my result
from mrjob.job import MRJob
from mrjob.step import MRStep
class MovieRatings(MRJob):
def steps(self):
return [
MRStep(mapper=self.mapper_get_ratings,
reducer=self.reducer_count_ratings),
]
def mapper_get_ratings(self, _, line):
(word) = line.split(' ')
yield word, 1
def reducer_count_ratings(self, key, values):
yield Key, sum(values)
if __name__ == '__main__':
MovieRatings.run()
i am getting the following error with Python 2
[root#localhost Desktop]# python RatingsBreakdown.py UN.txt
Traceback (most recent call last):
File "RatingsBreakdown.py", line 1, in <module>
from mrjob.job import MRJob
File "/usr/lib/python2.6/site-packages/mrjob/job.py", line 1106
for k, v in unfiltered_jobconf.items() if v is not None
^
SyntaxError: invalid syntax
Also Python 3
[root#localhost Desktop]# python3 RatingsBreakdown.py UN.txt
No configs found; falling back on auto-configuration
No configs specified for inline runner
Running step 1 of 2...
Creating temp directory /tmp/RatingsBreakdown.training.20171128.083536.602598
Error while reading from /tmp/RatingsBreakdown.training.20171128.083536.602598/step/000/mapper/00000/input:
Traceback (most recent call last):
File "RatingsBreakdown.py", line 25, in <module>
RatingsBreakdown.run()
File "/usr/lib/python3.4/site-packages/mrjob/job.py", line 424, in run
mr_job.execute()
File "/usr/lib/python3.4/site-packages/mrjob/job.py", line 445, in execute
super(MRJob, self).execute()
File "/usr/lib/python3.4/site-packages/mrjob/launch.py", line 185, in execute
self.run_job()
File "/usr/lib/python3.4/site-packages/mrjob/launch.py", line 233, in run_job
runner.run()
File "/usr/lib/python3.4/site-packages/mrjob/runner.py", line 511, in run
self._run()
File "/usr/lib/python3.4/site-packages/mrjob/sim.py", line 144, in _run
self._run_mappers_and_combiners(step_num, map_splits)
File "/usr/lib/python3.4/site-packages/mrjob/sim.py", line 185, in _run_mappers_and_combiners
for task_num, map_split in enumerate(map_splits)
File "/usr/lib/python3.4/site-packages/mrjob/sim.py", line 120, in _run_multiple
func()
File "/usr/lib/python3.4/site-packages/mrjob/sim.py", line 662, in _run_mapper_and_combiner
run_mapper()
File "/usr/lib/python3.4/site-packages/mrjob/sim.py", line 685, in _run_task
stdin, stdout, stderr, wd, env)
File "/usr/lib/python3.4/site-packages/mrjob/inline.py", line 92, in invoke_task
task.execute()
File "/usr/lib/python3.4/site-packages/mrjob/job.py", line 433, in execute
self.run_mapper(self.options.step_num)
File "/usr/lib/python3.4/site-packages/mrjob/job.py", line 517, in run_mapper
for out_key, out_value in mapper(key, value) or ():
File "RatingsBreakdown.py", line 13, in mapper_get_ratings
(userID, movieID, rating, timestamp) = line.split('\t')
ValueError: need more than 1 value to unpack
Also with my MovieRatings
[root#localhost Desktop]# python3 MovieRatings.py UN.txt
No configs found; falling back on auto-configuration
No configs specified for inline runner
Running step 1 of 1...
Creating temp directory /tmp/MovieRatings.training.20171128.083635.368889
Error while reading from /tmp/MovieRatings.training.20171128.083635.368889/step/000/reducer/00000/input:
Traceback (most recent call last):
File "MovieRatings.py", line 20, in <module>
MovieRatings.run()
File "/usr/lib/python3.4/site-packages/mrjob/job.py", line 424, in run
mr_job.execute()
File "/usr/lib/python3.4/site-packages/mrjob/job.py", line 445, in execute
super(MRJob, self).execute()
File "/usr/lib/python3.4/site-packages/mrjob/launch.py", line 185, in execute
self.run_job()
File "/usr/lib/python3.4/site-packages/mrjob/launch.py", line 233, in run_job
runner.run()
File "/usr/lib/python3.4/site-packages/mrjob/runner.py", line 511, in run
self._run()
File "/usr/lib/python3.4/site-packages/mrjob/sim.py", line 150, in _run
self._run_reducers(step_num, num_reducer_tasks)
File "/usr/lib/python3.4/site-packages/mrjob/sim.py", line 246, in _run_reducers
for task_num in range(num_reducer_tasks)
File "/usr/lib/python3.4/site-packages/mrjob/sim.py", line 120, in _run_multiple
func()
File "/usr/lib/python3.4/site-packages/mrjob/sim.py", line 685, in _run_task
stdin, stdout, stderr, wd, env)
File "/usr/lib/python3.4/site-packages/mrjob/inline.py", line 92, in invoke_task
task.execute()
File "/usr/lib/python3.4/site-packages/mrjob/job.py", line 439, in execute
self.run_reducer(self.options.step_num)
File "/usr/lib/python3.4/site-packages/mrjob/job.py", line 560, in run_reducer
for out_key, out_value in reducer(key, values) or ():
File "MovieRatings.py", line 17, in reducer_count_ratings
yield Key, sum(values)
NameError: name 'Key' is not defined
I would like to solve the error and understand what ny mistake is.
Seems like this library only works in Python3
File "RatingsBreakdown.py", line 13, in mapper_get_ratings
(userID, movieID, rating, timestamp) = line.split('\t')
ValueError: need more than 1 value to unpack
First, you ran RatingsBreakdown.py... Also, your shown input contains no tabs and you have tried to extract 4 columns. Not really clear what you expected here.
File "MovieRatings.py", line 17, in reducer_count_ratings
yield Key, sum(values)
NameError: name 'Key' is not defined
Self explanatory... your variable is lowercase key
You are trying the examples in this course (link) right?
According to this issue, mrjob has dropped for Python 2.6.
How I fixed it is installing Python 2.7 (refernece) on the CentOS the VM is using. Then set up pip (reference) and install mrjob again.
Everything works now by running this:
python2.7 RatingsBreakdown.py u.data
I worked on the same but without using steps function. It worked.
from mrjob.job import MRJob
class wordcount(MRJob):
def mapper(self, _, line):
(word) = line.split(' ')
yield word, 1
def reducer(self,x,count):
yield x,sum(count)
if __name__ == '__main__':
wordcount.run()
I have this weird error that I have never seen before. I ran an RF automation regression test using Chrome and after a while, I got this error which basically stops the test execution and does not provide any test results.
I also noticed this new text line that I haven't seen before during text execution:
DevTools listening on
ws://127.0.0.1:12306/devtools/browser/df1c8bcc-867c-41bc-a9b4-c364bdfafec2
(The test scripts have been used before & passed without any issues)
W8-BENE date format - ddMMMMMyyyyDot :: This is to test the differ...
DevTools listening on
ws://127.0.0.1:12537/devtools/browser/6d32afb6-90f2-46d4-a18a-001fa61d2444
[ ERROR ] Unexpected error: IOError: [Errno 0] Error Traceback (most
recent call last): File
"c:\python27\lib\site-packages\robot\utils\application.py", line 83,
in _execute
rc = self.main(arguments, **options)
File "c:\python27\lib\site-packages\robot\run.py", line 445, in main
result = suite.run(settings)
File "c:\python27\lib\site-packages\robot\running\model.py", line
248, in run
self.visit(runner)
File "c:\python27\lib\site-packages\robot\model\testsuite.py", line
161, in visit
visitor.visit_suite(self)
File "c:\python27\lib\site-packages\robot\model\visitor.py", line
87, in visit_suite
suite.tests.visit(self)
File "c:\python27\lib\site-packages\robot\model\itemlist.py", line
76, in visit
item.visit(visitor)
File "c:\python27\lib\site-packages\robot\model\testcase.py", line
74, in visit
visitor.visit_test(self)
File "c:\python27\lib\site-packages\robot\running\runner.py", line
151, in visit_test
result)
File "c:\python27\lib\site-packages\robot\running\runner.py", line
182, in _run_teardown
exception = self._run_setup_or_teardown(teardown)
File "c:\python27\lib\site-packages\robot\running\runner.py", line
201, in _run_setup_or_teardown
StepRunner(self._context).run_step(data, name=name)
File "c:\python27\lib\site-packages\robot\running\steprunner.py",
line 57, in run_step
return runner.run(step, context)
File
"c:\python27\lib\site-packages\robot\running\librarykeywordrunner.py",
line 56, in run
return return_value File "c:\python27\lib\site-packages\robot\running\statusreporter.py", line
54, in exit
context.end_keyword(result)
File "c:\python27\lib\site-packages\robot\running\context.py", line
179, in end_keyword
self.output.end_keyword(keyword)
File "c:\python27\lib\site-packages\robot\output\output.py", line
65, in end_keyword
LOGGER.end_keyword(kw)
File "c:\python27\lib\site-packages\robot\output\logger.py", line
195, in end_keyword
logger.end_keyword(keyword)
File
"c:\python27\lib\site-packages\robot\output\console\verbose.py", line
62, in end_keyword
self._writer.keyword_marker(kw.status)
File
"c:\python27\lib\site-packages\robot\output\console\verbose.py", line
136, in keyword_marker
self._clear_status()
File
"c:\python27\lib\site-packages\robot\output\console\verbose.py", line
124, in _clear_status
self._write_info()
File
"c:\python27\lib\site-packages\robot\output\console\verbose.py", line
90, in _write_info
self._stdout.write(self._last_info)
File
"c:\python27\lib\site-packages\robot\output\console\highlighting.py",
line 51, in write
self.stream.write(console_encode(text, stream=self.stream))
W8-BENE date format - ddMMMMMyyyyDot :: This is to test the differ...
C:\Development\robot-scripts\WebApp>
Has anyone had the same issue? I can't seem to find any solution. I uninstalled and reinstalled everything even update all the web drivers.
I had the same error after update to WIN 10. Just did fresh python install and it works fine for me. also look here: https://github.com/robotframework/robotframework/issues/2709
I'm doing gclient sync in linux and windows and in both I'm getting the same error after around 15 min.
Traceback (most recent call last):
File "/home/jgd/dev/depot_tools/gclient.py", line 2295, in <module>
sys.exit(main(sys.argv[1:]))
File "/home/jgd/dev/depot_tools/gclient.py", line 2281, in main
return dispatcher.execute(OptionParser(), argv)
File "/home/jgd/dev/depot_tools/subcommand.py", line 252, in execute
return command(parser, args[1:])
File "/home/jgd/dev/depot_tools/gclient.py", line 2030, in CMDsync
ret = client.RunOnDeps('update', args)
File "/home/jgd/dev/depot_tools/gclient.py", line 1340, in RunOnDeps
work_queue.flush(revision_overrides, command, args, options=self._options)
File "/home/jgd/dev/depot_tools/gclient_utils.py", line 1047, in run
self.item.run(*self.args, **self.kwargs)
File "/home/jgd/dev/depot_tools/gclient.py", line 766, in run
self.ParseDepsFile()
File "/home/jgd/dev/depot_tools/gclient.py", line 562, in ParseDepsFile
gclient_eval.Check(deps_content, filepath, global_scope, local_scope)
File "/home/jgd/dev/depot_tools/gclient_eval.py", line 240, in Check
result_scope = _gclient_exec(content, global_scope, filename=path)
File "/home/jgd/dev/depot_tools/gclient_eval.py", line 185, in _gclient_exec
_visit_in_module(stmt)
File "/home/jgd/dev/depot_tools/gclient_eval.py", line 169, in _visit_in_module
value = _gclient_eval(node.value, global_scope, filename=filename)
File "/home/jgd/dev/depot_tools/gclient_eval.py", line 146, in _gclient_eval
return _convert(node_or_string)
File "/home/jgd/dev/depot_tools/gclient_eval.py", line 145, in _convert
getattr(node, 'lineno', '<unknown>')))
ValueError: unexpected AST node: <_ast.Num object at 0x1cf5d10> Num(n=1) (file '/home/jgd/dev/jgd/webrtc/src/chromium/src/buildtools/DEPS', line 1)
Error: Command '/usr/bin/python -u src/sync_chromium.py --target-revision 316b880c55452eb694a27ba4d1aa9e74ec9ef342' returned non-zero exit status 1 in /home/jgd/dev/jgd/webrtc
Both are fresh installed and I have no idea about what is happening, it is the first time that this occurs to me. Know anyone how to solve it?
EDIT: The DEPS file that appears in error trace is the following:
recursion = 1
use_relative_paths = True
vars = {
"git_url": "https://chromium.googlesource.com",
"clang_format_rev": "0ed791d1387a3c9146ea6c453c646f3c0fc97784", # r282136
"libcxx_revision": "b1ece9c037d879843b0b0f5a2802e1e9d443b75a", # r256621
"libcxxabi_revision": "0edb61e2e581758fc4cd4cd09fc588b3fc91a653", # r256323
}
deps = {
"clang_format/script":
Var("git_url") + "/chromium/llvm-project/cfe/tools/clang-format.git#" +
Var("clang_format_rev"),
"third_party/libc++/trunk":
Var("git_url") + "/chromium/llvm-project/libcxx.git" + "#" +
Var("libcxx_revision"),
"third_party/libc++abi/trunk":
Var("git_url") + "/chromium/llvm-project/libcxxabi.git" + "#" +
Var("libcxxabi_revision"),
}
AFAIK this is auto-generated.
sync_chromium.py was removed back in December, replaced by a more efficient and far smaller download package. I suggest you follow the instructions at https://webrtc.org/native-code/development and get a newer checkout. It should be less likely to have download problems.
The issue here is the version of Python used. As you can see in command error prompt, the version that I have used is not 2.7+ as recomended in chromium website. Doing the change from Python to Python2.7 solve the issue.
I followed the instructions here: http://shon.github.io/2014/06/19/ui_testing_and_bdd.html about setting up Splinter with Behaving to run automated tests. I'm able to run a test successfully, but at the end of the test, it throws an error saying:
KeyError: 'browser'
and it won't continue testing any additional feature files. I'm pretty new to python and need some help in troubleshooting this.
Exception KeyError: 'browser'
Traceback (most recent call last):
File "/usr/local/bin/behave", line 11, in <module> sys.exit(main())
File "/Library/Python/2.7/site-packages/behave/__main__.py", line 109, in main
failed = runner.run()
File "/Library/Python/2.7/site-packages/behave/runner.py", line 672, in run
return self.run_with_paths()
File "/Library/Python/2.7/site-packages/behave/runner.py", line 693, in run_with_paths
return self.run_model()
File "/Library/Python/2.7/site-packages/behave/runner.py", line 483, in run_model
failed = feature.run(self)
File "/Library/Python/2.7/site-packages/behave/model.py", line 523, in run
failed = scenario.run(runner)
File "/Library/Python/2.7/site-packages/behave/model.py", line 867, in run
runner.run_hook('before_scenario', runner.context, self)
File "/Library/Python/2.7/site-packages/behave/runner.py", line 405, in run_hook
self.hooks[name](context, *args)
File "features/environment.py", line 48, in before_scenario
context.browser = default_browser
File "/Library/Python/2.7/site-packages/behave/runner.py", line 223, in __setattr__
record = self._record[attr]
KeyError: 'browser'
I found the issue. It is related to the Feature file structure. The Feature file was missing:
Background:
Given a browser
This also required changes to the environment.py file based on the info here: https://github.com/ggozad/behaving
I ran command testing the Gaslog example of Augutus:
Augustus consumer_config.xcfg
But got following error:
Traceback (most recent call last):
File "/usr/local/bin/Augustus", line 171, in <module>
main(config)
File "/usr/local/lib/python2.7/dist-packages/augustus/engine/mainloop.py", line 532, in main
mainLoop = MainLoop(configuration, dataStream=dataStream, rethrowExceptions=rethrowExceptions)
File "/usr/local/lib/python2.7/dist-packages/augustus/engine/mainloop.py", line 150, in __init__
self.model = xmlbase.loadfile(fileLocation, pmml.X_ODG_PMML, lineNumbers=True)
File "/usr/local/lib/python2.7/dist-packages/augustus/core/xmlbase.py", line 1628, in loadfile
return load(file(fileName), base, validation, dropSpecial, lineNumbers)
File "/usr/local/lib/python2.7/dist-packages/augustus/core/xmlbase.py", line 1807, in load
parser.parse(stream)
File "/usr/lib/python2.7/xml/sax/expatreader.py", line 107, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/lib/python2.7/xml/sax/xmlreader.py", line 123, in parse
self.feed(buffer)
File "/usr/lib/python2.7/xml/sax/expatreader.py", line 210, in feed
self._parser.Parse(data, isFinal)
File "/usr/lib/python2.7/xml/sax/expatreader.py", line 307, in end_element
self._cont_handler.endElement(name)
File "/usr/local/lib/python2.7/dist-packages/augustus/core/xmlbase.py", line 1728, in endElement
raise XMLValidationError("%sXMLValidationError: %s." % (stacktrace, str(err)))
augustus.core.xmlbase.XMLValidationError: Below is a traceback to the line that caused the actual exception.
File "/usr/local/lib/python2.7/dist-packages/augustus/core/xmlbase.py", line 1721, in endElement
last.validate(recurse=False, exception=True)
File "/usr/local/lib/python2.7/dist-packages/augustus/core/xmlbase.py", line 872, in validate
self.xsd.validate(self)
File "/usr/local/lib/python2.7/dist-packages/augustus/core/xmlbase.py", line 1579, in validate
xml.post_validate()
File "/usr/local/lib/python2.7/dist-packages/augustus/core/pmml41.py", line 1656, in post_validate
pmmlApply.top_validate_transformationDictionary(self.transformationDictionary)
File "/usr/local/lib/python2.7/dist-packages/augustus/core/pmml41.py", line 7092, in top_validate_transformationDictionary
raise PMMLValidationError("Apply function \"%s\" not recognized (not built-in and not user-defined)" % function)
XMLValidationError: Apply function "formatDateTime" not recognized (not built-in and not user-defined).
Ref:
Example I was trying: https://github.com/codersofthedark/augustus/tree/master/augustus-examples/gaslog/introductory
Augustus: https://code.google.com/p/augustus/
I got the same error. I'm not an expert at Augustus, but it looks the model file, "example_model.pmml" has the function, "formatDateTime", spelled wrong in two places. It should be "formatDatetime" (i.e., "time" should start with a lowercase "t"). When I made that correction, the example ran and produced output in the results directory.