Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't read file #6

Closed
eddiepease opened this issue Oct 5, 2021 · 1 comment
Closed

Can't read file #6

eddiepease opened this issue Oct 5, 2021 · 1 comment

Comments

@eddiepease
Copy link

Hi - I'm trying to run the timemachine code. I have moved the 'main.py' into the root directory and run the following command

python __main__.py timemachine restore --fmt=graphml gossip-20210908.gsp.bz2

I get the following error related to reading the file, what I am doing wrong?

Traceback (most recent call last):
  File "__main__.py", line 13, in <module>
    cli()
  File "/home/eddie/topology/venv/lib/python3.8/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/eddie/topology/venv/lib/python3.8/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/eddie/topology/venv/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/eddie/topology/venv/lib/python3.8/site-packages/click/core.py", line 1257, in invoke
    sub_ctx = cmd.make_context(cmd_name, args, parent=ctx)
  File "/home/eddie/topology/venv/lib/python3.8/site-packages/click/core.py", line 700, in make_context
    self.parse_args(ctx, args)
  File "/home/eddie/topology/venv/lib/python3.8/site-packages/click/core.py", line 1048, in parse_args
    value, args = param.handle_parse_result(ctx, opts, args)
  File "/home/eddie/topology/venv/lib/python3.8/site-packages/click/core.py", line 1623, in handle_parse_result
    value = self.full_process_value(ctx, value)
  File "/home/eddie/topology/venv/lib/python3.8/site-packages/click/core.py", line 1589, in full_process_value
    value = self.process_value(ctx, value)
  File "/home/eddie/topology/venv/lib/python3.8/site-packages/click/core.py", line 1579, in process_value
    return self.type_cast_value(ctx, value)
  File "/home/eddie/topology/venv/lib/python3.8/site-packages/click/core.py", line 1568, in type_cast_value
    return _convert(value, (self.nargs != 1) + bool(self.multiple))
  File "/home/eddie/topology/venv/lib/python3.8/site-packages/click/core.py", line 1565, in _convert
    return self.type(value, self, ctx)
  File "/home/eddie/topology/venv/lib/python3.8/site-packages/click/types.py", line 46, in __call__
    return self.convert(value, param, ctx)
  File "/home/eddie/topology/cli/common.py", line 48, in convert
    return DatasetStream(f, self.decode)
  File "/home/eddie/topology/cli/common.py", line 13, in __init__
    header = self.stream.read(4)
  File "/usr/lib/python3.8/bz2.py", line 182, in read
    return self._buffer.read(size)
  File "/usr/lib/python3.8/_compression.py", line 68, in readinto
    data = self.read(len(byte_view))
  File "/usr/lib/python3.8/_compression.py", line 103, in read
    data = self._decompressor.decompress(rawblock, size)
OSError: Invalid data stream
@cdecker
Copy link
Contributor

cdecker commented Oct 5, 2021

Thanks @eddiepease for reporting this, it turns out this is the uncompressed stream, so removing the .bz2 suffix should get it working again. I'll compress and re-upload again.

@cdecker cdecker closed this as completed Oct 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants