Datacamp course token error

So I am doing datacamp course and have created a token but getting this error

Traceback (most recent call last):
  File "script.py", line 72, in exceptionCatcher
    raise exception
  File "script.py", line 3361, in run_ast_nodes
    if (await self.run_code(code, result,  async_=asy)):
  File "script.py", line 3458, in run_code
    self.showtraceback(running_compiled_code=True)
  File "script.py", line 2066, in showtraceback
    self._showtraceback(etype, value, stb)
  File "script.py", line 72, in exceptionCatcher
    raise exception
  File "script.py", line 3441, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "script.py", line 11, in <module>
    output = llm.invoke(question)
  File "script.py", line 385, in invoke
    self.generate_prompt(
  File "script.py", line 750, in generate_prompt
    return self.generate(prompt_strings, stop=stop, callbacks=callbacks, **kwargs)
  File "script.py", line 944, in generate
    output = self._generate_helper(
  File "script.py", line 787, in _generate_helper
    raise e
  File "script.py", line 774, in _generate_helper
    self._generate(
  File "script.py", line 1508, in _generate
    self._call(prompt, stop=stop, run_manager=run_manager, **kwargs)
  File "script.py", line 256, in _call
    response = self.client.post(
  File "script.py", line 273, in post
    hf_raise_for_status(response)
  File "script.py", line 358, in hf_raise_for_status
    raise BadRequestError(message, response=response) from e
huggingface_hub.utils._errors.BadRequestError:  (Request ID: 9_vo8nA3hTLIyUv-Qzgj8

)

Bad request:
Authorization header is correct, but the token seems invalid
1 Like