MathHubInfo / Legacy-localmh

DEPRECATED - A cross-repository administration tool for the local authoring in MathHub.info
1 stars 0 forks source link

lmh symbols regressed #274

Closed kohlhase closed 8 years ago

kohlhase commented 8 years ago

I get

Traceback (most recent call last):
  File "/path/to/localmh/bin/lmh", line 13, in <module>
    main()
  File "/path/to/localmh/bin/lmh", line 10, in main
    lmh.run(sys.argv[1:])
  File "/path/to/localmh/bin/../lmh/__init__.py", line 85, in run
    if main(argv):
  File "/path/to/localmh/bin/../lmh/__init__.py", line 79, in main
    return submods[args.action].do(args, unknown)
  File "/path/to/localmh/bin/../lmh/commands/symbols/__init__.py", line 27, in do
    return run.do(arguments, unparsed)
  File "/path/to/localmh/bin/../lmh/commands/symbols/run.py", line 10, in do
    res = check_symbols(p) and res
  File "/path/to/localmh/bin/../lmh/lib/modules/symbols.py", line 223, in check_symbols
    mods = list(filter(lambda x:needsPreamble(x), mods))
  File "/path/to/localmh/bin/../lmh/lib/modules/symbols.py", line 223, in <lambda>
    mods = list(filter(lambda x:needsPreamble(x), mods))
  File "/path/to/localmh/bin/../lmh/lib/modules/__init__.py", line 29, in needsPreamble
    return re.search(r"\\begin(\w)*{document}", read_file(file)) == None
  File "/path/to/localmh/bin/../lmh/lib/io.py", line 197, in read_file
    text = text_file.read()
  File "/usr/lib/python3.4/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe4 in position 10: ordinal not in range(128)

lmh seems to have crashed with <class 'UnicodeDecodeError'>
a report will be generated in 
tkw1536 commented 8 years ago

Clearly a unicode error. I will take a look tomorrow.

kohlhase commented 8 years ago

I still get this error, even after update.

tkw1536 commented 8 years ago

weird, which repository are you testing in?

kohlhase commented 8 years ago

on MathHub/ODK/lmfdb/source

kohlhase commented 8 years ago

but I also get

cd ~/localmh/MathHub/smglom/sets/
Michaels-MBP:sets kohlhase$ lmh symbols
Traceback (most recent call last):
  File "/path/to/localmh/bin/lmh", line 13, in <module>
    main()
  File "/path/to/localmh/bin/lmh", line 10, in main
    lmh.run(sys.argv[1:])
  File "/mounted/lmh/lmh/__init__.py", line 85, in run
    if main(argv):
  File "/mounted/lmh/lmh/__init__.py", line 79, in main
    return submods[args.action].do(args, unknown)
  File "/mounted/lmh/lmh/commands/symbols/__init__.py", line 27, in do
    return run.do(arguments, unparsed)
  File "/mounted/lmh/lmh/commands/symbols/run.py", line 10, in do
    res = check_symbols(p) and res
  File "/mounted/lmh/lmh/lib/modules/symbols.py", line 232, in check_symbols
    mods = list(filter(lambda x:needsPreamble(x), mods))
  File "/mounted/lmh/lmh/lib/modules/symbols.py", line 232, in <lambda>
    mods = list(filter(lambda x:needsPreamble(x), mods))
  File "/mounted/lmh/lmh/lib/modules/__init__.py", line 29, in needsPreamble
    return re.search(r"\\begin(\w)*{document}", read_file(file)) == None
  File "/mounted/lmh/lmh/lib/io.py", line 180, in read_file
    text = text_file.read()
  File "/usr/lib/python3.4/codecs.py", line 313, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe4 in position 10: invalid continuation byte

lmh seems to have crashed with <class 'UnicodeDecodeError'>
a report will be generated in 
kohlhase commented 8 years ago

indeed, works for me now.