Seite 1 von 1

Assignment submission

Verfasst: 27. Okt 2019 20:30
von eustro
Hello everyone,

I am trying to submit the assignment0. When I type the submission command
> sbt "submit myID myToken"
I get following response:
> myID was unexpected at this time.

What is wrong here? Did anyone experience this error?

I am on a Windows10 machine, I installed the Scala and sbt binaries from the official websites. Am I missing something? Does it work at all on Windows?

Re: Assignment submission

Verfasst: 28. Okt 2019 10:16
von mirko-koehler
Hello,

Yes, the tool also works on Windows. Can you try to start the SBT shell by simply typing
and then in the shell try to use

Code: Alles auswählen

submit myID myToken
Also, you have to be in the TU network to access the submission site. That means that you have to be connected to eduroam or use the VPN (https://www.hrz.tu-darmstadt.de/netz/ne ... dex.de.jsp).

Re: Assignment submission

Verfasst: 28. Okt 2019 15:47
von jkapitzke
I also get an error at the moment (under linux): "not a valid key". It had worked before, maybe I am doing something wrong?

$ sbt submit ab12abcd D0123456
[info] Loading project definition from .../copl/exe1/project
[info] Loading settings from build.sbt ...
[info] Set current project to ex01 (in build file:.../copl/exe1/)
[error] Not a valid command: submit (similar: set)
[error] Not a valid project ID: submit
[error] Expected ':' (if selecting a configuration)
[error] Not a valid key: submit (similar: bgList)
[error] submit
[error] ^

Jonas
(sent from TU Darmstadt Network)

Re: Assignment submission

Verfasst: 28. Okt 2019 15:59
von mirko-koehler
I just tried it and it worked for me. Don't forget to put quotes when you enter the command in one line

Code: Alles auswählen

sbt 'submit ab12abcd MYTOKEN'
Also, ensure that the submission plugin is added in your project/plugins.sbt

Code: Alles auswählen

resolvers += Resolver.bintrayIvyRepo("stg-tud", "sbt-plugins")

addSbtPlugin("de.tudarmstadt.stg" % "sbt-submission" % "1.2.0")

Re: Assignment submission

Verfasst: 28. Okt 2019 20:06
von eustro
mirko-koehler hat geschrieben:
28. Okt 2019 10:16
Hello,

Yes, the tool also works on Windows. Can you try to start the SBT shell by simply typing
and then in the shell try to use

Code: Alles auswählen

submit myID myToken
Also, you have to be in the TU network to access the submission site. That means that you have to be connected to eduroam or use the VPN (https://www.hrz.tu-darmstadt.de/netz/ne ... dex.de.jsp).
I did try that. I get another error now:

Code: Alles auswählen

[error] Expected ';'
[error] submit myID myToken
[error]                    ^
Even if I type ';' at the end of teh command I get the same error. Any idea what's wrong here?

By the way, I am in a Wohnheim, I am physically connected to the TU network at home.

Re: Assignment submission

Verfasst: 28. Okt 2019 22:24
von melanoleucos
Hello,

I also have the same issue. I have Scala and sbt installed in my machine and I don't use any IDE plugins. When I try to submit from console (after entering in 'sbt') I get the same 'Expected ';' error.

IP

Re: Assignment submission

Verfasst: 29. Okt 2019 10:00
von mirko-koehler
I get this error when I run the sbt command in a folder that does not contain the build.sbt file. Make sure that you run the command in the folder where the build.sbt (and the project folder) is located.

Code: Alles auswählen

$ ls
build.sbt  project  src  target

$ sbt 'submit ab12abcd MYTOKEN'

Re: Assignment submission

Verfasst: 29. Okt 2019 10:25
von eustro
mirko-koehler hat geschrieben:
29. Okt 2019 10:00
I get this error when I run the sbt command in a folder that does not contain the build.sbt file. Make sure that you run the command in the folder where the build.sbt (and the project folder) is located.

Code: Alles auswählen

$ ls
build.sbt  project  src  target

$ sbt 'submit ab12abcd MYTOKEN'
That worked, thank you!
The path was the problem here, I didn't know we were supposed to run the command in the template-dir.
Though the > sbt "submit id token" still does not work for me, but if I launch sbt like you posted before and then type the submit command there, it works.

Now the assignments can come :)

Re: Assignment submission

Verfasst: 29. Okt 2019 10:34
von melanoleucos
Yeah, I can also confirm that the location of execution was the problem. Everything works as expected now, thanks for the help.

IP