Repository: Cloud-CV/EvalAI
Issue: Worker error in PHASE_ANNOTATION_FILE_NAME_MAP.get()
Root cause: Configuration Error

I did a .yaml based on the example. Seems like that: 

```
leaderboard:
  - id: 1
    schema: { "labels": ["Metric1", "Metric2", "Metric3", "Total"], "default_order_by": "Total" }

challenge_phases:
  - id: 1
    name: Dev Phase
    description: challenge_phase_1_description.html
    leaderboard_public: True
    is_public: True
    start_date: 2018-06-01 00:00:00
    end_date: 2018-06-20 00:00:00
    test_annotation_file: test_annotation.txt
    codename: dev
    max_submissions_per_day: 5
    max_submissions: 50
  - id: 2
    name: Test Phase
    description: challenge_phase_1_description.html
    leaderboard_public: True
    is_public: True
    start_date: 2018-01-19 00:00:00
    end_date: 2018-05-24 23:59:59
    test_annotation_file: test_annotation.txt
    codename: test
    max_submissions_per_day: 5
    max_submissions: 50

dataset_splits:
  - id: 1
    name: Train Split
    codename: train_split
  - id: 2
    name: Test Split
    codename: test_split

challenge_phase_splits:
  - challenge_phase_id: 1
    leaderboard_id: 1
    dataset_split_id: 1
    visibility: 1
  - challenge_phase_id: 1
    leaderboard_id: 1
    dataset_split_id: 2
    visibility: 2
  - challenge_phase_id: 2
    leaderboard_id: 1
    dataset_split_id: 2
    visibility: 1
```
(And everything imports well)

However, when I submit a file (in the submission page), I got this error in the log:

```
worker_1    | [2018-06-09 12:52:06] ERROR Error in receiving message from submission queue with error 'NoneType' object has no attribute 'get'
worker_1    | Traceback (most recent call last):
worker_1    |   File "scripts/workers/submission_worker.py", line 467, in process_submission_callback
worker_1    |     process_submission_message(body)
worker_1    |   File "scripts/workers/submission_worker.py", line 446, in process_submission_message
worker_1    |     run_submission(challenge_id, challenge_phase, submission_instance, user_annotation_file_path,)
worker_1    |   File "scripts/workers/submission_worker.py", line 278, in run_submission
worker_1    |     annotation_file_name = PHASE_ANNOTATION_FILE_NAME_MAP.get(challenge_id).get(phase_id)
worker_1    | AttributeError: 'NoneType' object has no attribute 'get'
```

Do you know what could happening? 

Hi @AdrianP- I think that the challenge isn't loaded in the worker. Can you please check from django admin if `Publically Available` and `Approved by admin` flags are set to `True` ?

Hi @RishabhJain2018 , thanks for the fast answer. 

`Publicly Available` was set to True but `Approved by admin` wasn't. However I just tried with `Approved by admin` set to True but I get the same error. 

I didn't mention in the last post, but I tried with the last version of the repo and the docker setup  



okay. I think you didn't restart the submission worker. Please follow these steps and then tell us the response:
1. Stop the submission worker 
2. Set `Approved by admin` & `Publicly Available` flag to True
3. Start the submission worker

that's it, thanks @RishabhJain2018 !

I only did a `docker restart`of the evalai_worker and now I can submit without `PHASE_ANNOTATION_FILE_NAME_MAP` error

okay! No problem.
Since this is resolved hence I am closing this.