curry-club-aux / curry-club-augsburg.de

Our Website
http://curry-club-aux.github.io/curry-club-augsburg.de/
Other
17 stars 5 forks source link

how to fix the error:" hGetContents: invalid argument (invalid byte sequence)"? #63

Closed luckypoem closed 7 years ago

luckypoem commented 7 years ago

hi.

root@AR:/usr/local/curry-club-augsburg.de# ./curry-site build Initialising... Creating store... Creating provider... Running rules... Checking for out-of-date items Compiling [ERROR] ./templates/default.html: hGetContents: invalid argument (invalid byte sequence) root@AR:/usr/local/curry-club-augsburg.de#

Profpatsch commented 7 years ago

Is this a fresh checkout from master, or did you do any changes?

luckypoem commented 7 years ago

it's a fresh checkout from master. how to fix the error?

luckypoem commented 7 years ago

ghc --make curry-site.hs (it generates executable file: curry-site) ./curry-site build

Profpatsch commented 7 years ago

Can you try

env LC_ALL ./curry-site build

? I have a suspicion.

iblech commented 7 years ago

@Profpatsch, do you mean env -u LC_ALL ./curry-site build? Or env LC_ALL=C ./curry-site build?

Profpatsch commented 7 years ago

Err, of course the latter. :)

The question is now: Where is the error thrown? Shouldn’t building on ghc 8.0 now throw stack traces for stuff like that? Or does one need to enable it manually?

sternenseemann commented 7 years ago

Note: in bash it's

LC_ALL=C ./curry-site build
Profpatsch commented 7 years ago

It’s just a bash special syntax. Since env is an executable that works everywhere.

luckypoem commented 7 years ago

hi.

root@AR:/usr/local/curry-club-augsburg.de# stack install root@AR:/usr/local/curry-club-augsburg.de# .stack-work/dist/i386-linux/Cabal-1.22.5.0/build/curry-site/curry-site build Initialising... Creating store... Creating provider... Running rules... Checking for out-of-date items Compiling curry-site: Data.Binary.Get.runGet at position 0: not enough bytes cached templates/default.html root@AR:/usr/local/curry-club-augsburg.de# root@AR:/usr/local/curry-club-augsburg.de# .stack-work/install/i386-linux/lts-6.22/7.10.3/bin/curry-site build Initialising... Creating store... Creating provider... Running rules... Checking for out-of-date items Compiling curry-site: Data.Binary.Get.runGet at position 0: not enough bytes cached templates/default.html root@AR:/usr/local/curry-club-augsburg.de# root@AR:/usr/local/curry-club-augsburg.de# LC_ALL=C ./curry-site build Initialising... Creating store... Creating provider... Running rules... Checking for out-of-date items curry-site: Data.Binary.Get.runGet at position 0: not enough bytes CallStack (from HasCallStack): error, called at libraries/binary/src/Data/Binary/Get.hs:342:5 in binary-0.8.3.0:Data.Binary.Get Compiling cached templates/default.html root@AR:/usr/local/curry-club-augsburg.de#

same results. so how to fix the errors??

timjb commented 7 years ago

@luckypoem This error may be related to https://github.com/jaspervdj/hakyll/issues/336.

I would try running

./curry-site clean # clears the cache, which I guess is corrupted
./curry-site build
luckypoem commented 7 years ago

@timjb ,thank u.it does work