Skip to content
This repository has been archived by the owner on Nov 14, 2022. It is now read-only.

Common development errors

James Brookes edited this page Aug 12, 2022 · 4 revisions

Idea

This page is for any error you have seen more than a couple of times, as this is a sign that other people working on the project, will at some point also encounter it, at which point, you can link them to this page for the fix.

ValueError: You have multiple authentication backends configured and therefore must provide the backend argument or set the backend attribute on the user.

Context: after starting the webapp Fix: The app in development mode requires a super-user. To install one run autoreduce-webapp-manage loaddata super_user_fixture


There's nothing at http://localhost:7900

You need to manually port forward 7900 in VSCode.


I don't see the browser after going to http://localhost:7900

Check that ~/.autoreduce/selenium_tests/config.json is set to "run_headless": false. This should not be committed or it will break the unit tests.


Every 2nd/3rd/etc run shows up in queue processor output

Check the output of docker ps - you may have some stray queue processor consumers connected that are processing the message before the one you are debugging gets to. ActiveMQ goes around in a round-robin style so you may be seeing every 2nd/3rd/etc runs depending on how many leftover consumers there are.


Port #### is already being used / not free

The debugging uses 2 ports:

  • 5678 for the queue processor
  • 5679 for the web app

If the container for either of those has not been killed properly it will not free the port. In this case just manually docker kill the one that is taken.


ModuleNotFoundError: No module named 'urlparse'

Note: This is also documented by RAL's DataGateway-API

If you get the following error when starting a package of autoreduce, changes need to be made to your Python environment:

ModuleNotFoundError: No module named 'urlparse'

Explanation of the cause for this issue can be found in a Python ICAT issue. Essentially, the version of setuptools used must be < 58.0.0. If you have already installed the packages dependencies (via pip install), you will need to re-install setuptools (using a suitable version) and re-install Python ICAT so it can be rebuilt correctly. The following commands can be used for this process:

# Uninstall and re-install setuptools using a version < 58.0.0
pip uninstall -y setuptools
pip install 'setuptools<58.0.0'

# Re-install Python ICAT so it can be built properly
pip uninstall -y python-icat
pip install python-icat=0.21.0
Clone this wiki locally