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

Problem running volk_modtool #406

Open
dmiralles2009 opened this issue Oct 9, 2020 · 3 comments
Open

Problem running volk_modtool #406

dmiralles2009 opened this issue Oct 9, 2020 · 3 comments

Comments

@dmiralles2009
Copy link
Contributor

I have been having issues when running volk_modtool in my Ubuntu box from afresh copy of the master branch of volk. The executable starts ok, but it seems to be failing when parsing some files due to encoding issues.

For example, this is the output I keep getting when running the tool

Initializing config file...
name: lllll
destination: /home/dmiralles/Documents/test
base: /home/dmiralles/Documents/volk-master
Traceback (most recent call last):
  File "/usr/local/bin/volk_modtool", line 77, in <module>
    my_modtool.make_module_skeleton();
  File "/usr/local/lib/python3/dist-packages/volk_modtool/volk_modtool_generate.py", line 107, in make_module_skeleton
    instring = open(infile, 'r').read()
  File "/usr/lib/python3.6/codecs.py", line 321, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe4 in position 5: invalid continuation byte

Not sure why this is happening, but if using my local clone, the error happens when parsing files within the .git repo. I added a print statement for volk_modtool_generate.py l107, and this is what I get before it errs

/home/dmiralles/Documents/volk/.git/COMMIT_EDITMSG
/home/dmiralles/Documents/volk/.git/gitk.cache
/home/dmiralles/Documents/volk/.git/HEAD
/home/dmiralles/Documents/volk/.git/description
/home/dmiralles/Documents/volk/.git/FETCH_HEAD
/home/dmiralles/Documents/volk/.git/ORIG_HEAD
/home/dmiralles/Documents/volk/.git/config
/home/dmiralles/Documents/volk/.git/packed-refs
/home/dmiralles/Documents/volk/.git/index
Traceback (most recent call last):
  File "/usr/local/bin/volk_modtool", line 77, in <module>
    my_modtool.make_module_skeleton();
  File "/usr/local/lib/python3/dist-packages/volk_modtool/volk_modtool_generate.py", line 108, in make_module_skeleton
    instring = open(infile, 'r').read()
  File "/usr/lib/python3.6/codecs.py", line 321, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd6 in position 14: invalid continuation byte

which seems to indicate that it has encoding issues when reading contents of .git/index. This is probably a binary file, and we are using r option when reading.

@jdemel
Copy link
Contributor

jdemel commented Oct 10, 2020

So your goal is to start a new volk module? This does require some infrastructure from VOLK but it would be really confusing to carry around the whole git history. I'd consider this to be the same as a GR OOT where you start with an empty history as well.

I assume the correct fix here is to ignore .git entirely.

@jdemel
Copy link
Contributor

jdemel commented Oct 18, 2020

Would you mind to open a PR to fix this issue?

@dmiralles2009
Copy link
Contributor Author

dmiralles2009 commented Oct 18, 2020 via email

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