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

a simple test error #1

Open
zmiimz opened this issue May 27, 2019 · 4 comments
Open

a simple test error #1

zmiimz opened this issue May 27, 2019 · 4 comments

Comments

@zmiimz
Copy link

zmiimz commented May 27, 2019

installed fortdep and started a simple test in the src directory (contains only valid fortran f90 files of the same project, no subfolders)

fortdep2 -o deps.inc

no directories given; scanning recursively...
Traceback (most recent call last):
File "/home/term/.local/bin/fortdep2", line 11, in
load_entry_point('fortdep==190521', 'console_scripts', 'fortdep2')()
File "/home/term/.local/lib/python3.7/site-packages/fortdep-190521-py3.7.egg/fortdep2.py", line 270, in main
File "/home/term/.local/lib/python3.7/site-packages/fortdep-190521-py3.7.egg/fortdep2.py", line 125, in parse_source
File "/usr/lib64/python3.7/codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf6 in position 3110: invalid start byte

@gronki
Copy link
Owner

gronki commented Jun 3, 2019

Thank you for the report. It seems like issue with the encoding. Do you have any diacritic characters in the comments in your code? What OS and editor are you using? With this information I will try to work on the fix.

@gronki
Copy link
Owner

gronki commented Jun 3, 2019

For now I recommend using utf-8 encoding. I can also implement an option to manually specify the encoding as a quick fix.

@zmiimz
Copy link
Author

zmiimz commented Jun 3, 2019

Thanks,
OS is Linux, I used different editors: kate, geany, sublime text, atom, etc.
most files have charset=us-ascii, but some older sources have also charset=iso-8859-1

Translation to UTF-8 is an option but can produce some undesirable effects for old compilers on the clusters and therefore is not always feasible.

@gronki
Copy link
Owner

gronki commented Jun 3, 2019

I have pushed an update, you can now select encoding with -e option. Does it solve the issue for you?

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