Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set_active_project does not work without user_id #5

Open
julffers opened this issue May 6, 2022 · 1 comment
Open

set_active_project does not work without user_id #5

julffers opened this issue May 6, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@julffers
Copy link
Contributor

julffers commented May 6, 2022

  • pandahub version: 0.2.2 develop
  • Python version: 3.9
  • Operating System: Windows 10

Description

set_active project calls _get_user, which trys to run UUID4(self.user_id). If the user_id is not set ( and therefore is None by default), this results in "TypeError: one of the hex, bytes, bytes_le, fields, or int arguments must be given"

What I Did

  Input In [76] in <module>
    ph.set_active_project("li20ph")
  File c:\users\julffers\git_repos\pandahub\pandahub\lib\PandaHub.py:208 in set_active_project
    self.set_active_project_by_id(project_id)
  File c:\users\julffers\git_repos\pandahub\pandahub\lib\PandaHub.py:211 in set_active_project_by_id
    self.active_project = self._get_project_document({"_id": ObjectId(project_id)})
  File c:\users\julffers\git_repos\pandahub\pandahub\lib\PandaHub.py:260 in _get_project_document
    user = self._get_user()
  File c:\users\julffers\git_repos\pandahub\pandahub\lib\PandaHub.py:141 in _get_user
    {"id": UUID4(self.user_id)}, projection={"_id": 0, "hashed_password": 0}
  File ~\miniconda3\envs\pandahub\lib\uuid.py:171 in __init__
    raise TypeError('one of the hex, bytes, bytes_le, fields, '
TypeError: one of the hex, bytes, bytes_le, fields, or int arguments must be given
@julffers julffers added the bug Something isn't working label May 6, 2022
@SimonRubenDrauz
Copy link
Contributor

Should be solved, @julffers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants