empiricaly / empirica

Open source project to tackle the problem of long development cycles required to produce software to conduct multi-participant and real-time human experiments online.
https://empirica.ly/
Apache License 2.0
44 stars 8 forks source link

Empirica export does not accept path to tajriba as argument #431

Closed frasalvi closed 5 months ago

frasalvi commented 10 months ago

Is there an existing issue for this?

What happened?

Running empirica export path/to/tajriba.json does not seem to work.

When I run this outside from the root folder of an experiment, I simply get the error

Setting up export environment... 15:56:46.438 FTL empirica: failed to start error="no .empirica folder found, export must run within a project folder"

When I do it from the root folder, instead, it initially seem to work, but it does not produce any file.

Setting up export environment... 16:07:36.060 INF exporting data args="npm run export -- --filename /-2023-10-20-16-07-36.zip --tajfile / --srtoken iWHGzvMWkhogPCHP"

> export@1.0.0 export > npm run build && node --trace-warnings --enable-source-maps dist/index.js

> export@1.0.0 build > esbuild src/index.js --platform=node --define:process.env.NODE_ENV='"production"' --bundle --minify --outfile=dist/index.js --sourcemap

dist/index.js 706.6kb dist/index.js.map 2.8mb

⚡ Done in 340ms

Notice that the reason why this does not work when ran from the root folder seems to be that the --tajfile flag seems to be composed by always attaching the specified path to the <experiment-root>/.empirica/local path. So, as a workaround, if the argument provided is a local path starting from there instead of from the root folder, then the command works as intended.

Steps To Reproduce

No response

Empirica Version

Version: v1.8.3
SHA:     885604c
Branch:  main
Time:    2023-10-15T06:24:53Z

Client:  1.8.3
Server:  1.8.3

What OS are you seeing the problem on?

Linux

What browser are you seeing the problem on?

Does not apply

Relevant log output

No response

Anything else?

No response

Code of Conduct