original_docstring: 
      Load the problem information from a ZIP file and updates the attributes of 'problem'
      :param problem: DMLProblem to update
      :param file: ZipFile previoulsy opened and with a JSON File
      :return: None or raise ZipFileParsingException if there is any problem
      
docstring: Load the problem information from a ZIP file and updates the attributes of 'problem'
docstring_tokens: Load the problem information from a ZIP file and updates the attributes of ' problem '
code: def load_dml_problem(problem, file):
      """
      Load the problem information from a ZIP file and updates the attributes of 'problem'
      :param problem: DMLProblem to update
      :param file: ZipFile previoulsy opened and with a JSON File
      :return: None or raise ZipFileParsingException if there is any problem
      """
      state = 'Checking file existence'
      try:
          problem_json = extract_json(file, problem.problem_type())
          with ZipFile(file) as zfile:
              if not __DML_PROBLEM_FILES <= set(zfile.namelist()):
                  raise ZipFileParsingException(
                      f'ZIP file must contain the following files: {__DML_PROBLEM_FILES}')
  
              state = 'Reading JSON file'
              problem.title_md = problem_json.get('title', '')
              problem.min_stmt = int(problem_json['min_stmt'])
              problem.max_stmt = int(problem_json['max_stmt'])
              problem.position = int(problem_json['position'])
              if (not problem.title_md or problem.min_stmt <= 0 or problem.max_stmt <= 0 or
                      problem.min_stmt > problem.max_stmt):
                  raise ZipFileParsingException('Invalid value in JSON file: "title", "min_stmt" or "max_stmt"')
  
              state = 'Reading text.md file'
              with zfile.open('text.md', 'r') as text_file:
                  problem.text_md = text_file.read().decode(encoding='utf-8')
  
              state = 'Reading create.sql file'
              with zfile.open('create.sql', 'r') as create_file:
                  create_str = create_file.read().decode(encoding='utf-8')
                  problem.create_sql = create_str
  
              state = 'Reading insert.sql file'
              with zfile.open('insert.sql', 'r') as insert_file:
                  insert_str = insert_file.read().decode(encoding='utf-8')
                  problem.insert_sql = insert_str
  
              state = 'Reading solution.sql file'
              with zfile.open('solution.sql', 'r') as solution_file:
                  problem.solution = solution_file.read().decode(encoding='utf-8')
      except ZipFileParsingException:
          raise
      except Exception as excp:
          raise ZipFileParsingException("{}: {} - {}".format(state, type(excp), excp)) from excp
code_tokens: def load_dml_problem ( problem , file ) : state = 'Checking file existence' try : problem_json = extract_json ( file , problem . problem_type ( ) ) with ZipFile ( file ) as zfile : if not __DML_PROBLEM_FILES <= set ( zfile . namelist ( ) ) : raise ZipFileParsingException ( f'ZIP file must contain the following files: {__DML_PROBLEM_FILES}' ) state = 'Reading JSON file' problem . title_md = problem_json . get ( 'title' , '' ) problem . min_stmt = int ( problem_json [ 'min_stmt' ] ) problem . max_stmt = int ( problem_json [ 'max_stmt' ] ) problem . position = int ( problem_json [ 'position' ] ) if ( not problem . title_md or problem . min_stmt <= 0 or problem . max_stmt <= 0 or problem . min_stmt > problem . max_stmt ) : raise ZipFileParsingException ( 'Invalid value in JSON file: "title", "min_stmt" or "max_stmt"' ) state = 'Reading text.md file' with zfile . open ( 'text.md' , 'r' ) as text_file : problem . text_md = text_file . read ( ) . decode ( encoding = 'utf-8' ) state = 'Reading create.sql file' with zfile . open ( 'create.sql' , 'r' ) as create_file : create_str = create_file . read ( ) . decode ( encoding = 'utf-8' ) problem . create_sql = create_str state = 'Reading insert.sql file' with zfile . open ( 'insert.sql' , 'r' ) as insert_file : insert_str = insert_file . read ( ) . decode ( encoding = 'utf-8' ) problem . insert_sql = insert_str state = 'Reading solution.sql file' with zfile . open ( 'solution.sql' , 'r' ) as solution_file : problem . solution = solution_file . read ( ) . decode ( encoding = 'utf-8' ) except ZipFileParsingException : raise except Exception as excp : raise ZipFileParsingException ( "{}: {} - {}" . format ( state , type ( excp ) , excp ) ) from excp
short_docstring: Load the problem information from a ZIP file and updates the attributes of 'problem'
short_docstring_tokens: Load the problem information from a ZIP file and updates the attributes of ' problem '
comment: """
      Load the problem information from a ZIP file and updates the attributes of 'problem'
      :param problem: DMLProblem to update
      :param file: ZipFile previoulsy opened and with a JSON File
      :return: None or raise ZipFileParsingException if there is any problem
      """