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

Creation error while drawing view #1

Open
braton opened this issue Jun 7, 2018 · 2 comments
Open

Creation error while drawing view #1

braton opened this issue Jun 7, 2018 · 2 comments
Assignees
Labels
bug Something isn't working compat Compatibility with Python 2

Comments

@braton
Copy link

braton commented Jun 7, 2018

When I try to run the deepmage like below:

/tmp/deepmage$ python deepmage.py a.bin

the application crashes with the following trace:

Traceback (most recent call last):
  File "deepmage.py", line 225, in <module>
    Screen.wrapper(main_loop, catch_interrupt=True)
  File "/usr/local/lib/python2.7/dist-packages/asciimatics/screen.py", line 1169, in wrapper
    func(screen)
  File "deepmage.py", line 222, in main_loop
    UI(screen, f)
  File "deepmage.py", line 55, in __init__
    self.main_loop_internal()
  File "deepmage.py", line 150, in main_loop_internal
    self.redraw_if_needed()
  File "deepmage.py", line 116, in redraw_if_needed
    self.draw_view()
  File "deepmage.py", line 58, in draw_view
    self.view = self.reader.get_view(self.starting_word, self.words_in_view)
  File "/tmp/deepmage/bitstream_reader.hy", line 173, in get_view
    (+ first-word-idx number-of-words))])))
  File "/tmp/deepmage/bitstream_reader.hy", line 149, in __getitem__
    (for-bit-in-word word-number
  File "/tmp/deepmage/bitstream_reader.hy", line 29, in __getitem__
    (unless self.loaded (.load self))
  File "/tmp/deepmage/bitstream_reader.hy", line 18, in load
    (setv self.contents (bitstring.BitStream (.read self.file self.size)))
  File "/usr/local/lib/python2.7/dist-packages/bitstring.py", line 4133, in __new__
    x._initialise(auto, length, offset, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/bitstring.py", line 805, in _initialise
    self._initialise_from_auto(auto, length, offset)
  File "/usr/local/lib/python2.7/dist-packages/bitstring.py", line 836, in _initialise_from_auto
    self._setauto(auto, length, offset)
  File "/usr/local/lib/python2.7/dist-packages/bitstring.py", line 1274, in _setauto
    bs = self._converttobitstring(s)
  File "/usr/local/lib/python2.7/dist-packages/bitstring.py", line 1972, in _converttobitstring
    raise CreationError(*e.args)
bitstring.CreationError: Don't understand length '' of token.


Could you please take a look at this issue?

@mmiszczyk
Copy link
Owner

Please check if the issue is still present after the latest commit, and if it happens on Python 3. I've programmed deepmage on Python 3 and haven't yet tested compatibility with Python 2.

@mmiszczyk mmiszczyk added the bug Something isn't working label Jun 9, 2018
@mmiszczyk mmiszczyk self-assigned this Jun 9, 2018
@braton
Copy link
Author

braton commented Jun 9, 2018

Unfortunately the issue is still present with latest revision using Python 2. On Python 3 though it works well. Thank you.

@mmiszczyk mmiszczyk added the compat Compatibility with Python 2 label Jun 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working compat Compatibility with Python 2
Projects
None yet
Development

No branches or pull requests

2 participants