Issue with Ticket: User Management

Hi, I am having an issue with this ticket User Management. I believe the code is correct in the functions get_user, add_user, login_user, etc. I passed for all the unit tests, however I am getting an error when I run the check in the status page for the validation code. I am getting the error User management: invalid response to register. Can anyone point me to the right direction? Could it be a package issue? I can share my code, and anything else needed.

Hi @Neeraj_Kumar1_1

Thanks for raising this issue with the validation code generation for this lesson.

In order to get a better understanding of what exactly the error is, can you please attach the output from run.py so we can see exactly what error is being logged. This will help understand what the potential cause might be.

Once you add the output from run.py we can review it to help determine what the cause for the error might be.

Kindest regards,
Eoin

Hi Eoin, thank you for responding. I have attached the output. I am able to launch the app with run.py. I can reach the status page to do the status checks, however it fails when I do the user management check. The error states invalid response to register.
When I run the tests with pytest -m user_management, it passes all the checks. I also checked my code with a jupyter notebook, so I believe my code for all 6 functions are correct. I have double checked to make sure the packages are correct. I think the issue might be with the set up of my .ini file, but I am unsure,. Is there any way to double check that file with you?

Hi @Neeraj_Kumar1_1

That .ini file on initial review looks fine. Can you attach the output from the console for run.py when you click the validation? 10 or so lines before to about 40 or so after should cover sufficient detail to understand what exactly is happening. I can’t begin to make a hypothesis without that data as it’s not clear as what exactly happening.

Thanks and kindest regards,
Eoin

Gotcha, I have attached a snapshot of the console output. I think it might be something due to the setup of the db instance since it says user is not allowed to do action. Would you be able to troubleshoot?

Hi @Neeraj_Kumar1_1

Thanks for the message, reviewing it and looking back at your .ini file. It looks like your .ini file has in both the URI strings. This is different from the sample_mflix database that will be used so I’d recommend revisiting Chapter 0 and the lesson “Introduction and Setup” to ensure your connection is correct.

A quick test would be to change “myFirstDatabase” to “sample_mflix” in your .ini, if this works then it was the configuration string in your .ini that caused the issue.

Kindest regards,
Eoin