duckling icon indicating copy to clipboard operation
duckling copied to clipboard

Duckling on windows - stack exec fails

Open praneetnadkar opened this issue 7 years ago • 4 comments

Hi,

runnig stack exec on windows cmd fails here is the error:

stack exec duckling-example-exe duckling-example-exe.EXE: /usr/share/zoneinfo/: getDirectoryContents:findFirstFile: does not exist (The system cannot find the path specified.)

Before this, stack build was also failing, for this, I made the following changes:

Opened duckling.cabal file and replace regex-pcre with regex-pcre-builtin.

After this, stack build was successful.

praneetnadkar avatar Oct 03 '19 12:10 praneetnadkar

Just to be able to run the example replace tzs <- loadTimeZoneSeries "/usr/share/zoneinfo/" in Duckling/exe/ExampleMain.hs with path to some existing folder and copy the zoneinfo files to it.

You can copy the zoneinfo files from some existing system or use the one I have attached. zoneinfo.zip

BTW this is just a quick way how you can run the example. I am not trying to fix the source code.

vajanko avatar Nov 05 '19 20:11 vajanko

@vajanko 's suggestion will work for you. Though, it's recommended to run duckling on windows under docker or cygwin/msys2.

chessai avatar Nov 06 '20 05:11 chessai

zoneinfo

i am running this on windows, can you share the path u changeD?

ermarkar avatar Mar 23 '21 11:03 ermarkar

in file Duckling\exe\ExampleMain.hs replace line 53 (tzs <- loadTimeZoneSeries "/usr/share/zoneinfo/") with tzs <- loadTimeZoneSeries "c:/tmp/zoneinfo/"

Create directory c:/tmp/zoneinfo/ and extract this zip package into it.

Now you can build and run $ stack build $ stack exec duckling-example-exe

vajanko avatar Mar 23 '21 15:03 vajanko