Résumé : Observations of the green and red-doublet emission lines have previously been realized for several comets. We present here a chemistry-emission coupled model to study the production and loss mechanisms of the O(1S) and O(1D) states, which are responsible for the emission lines of interest for comet 67P/Churyumov-Gerasimenko. The recent discovery of O2 in significant abundance relative to water 3.80 ± 0.85 within the coma of 67P has been taken into consideration for the first time in such models. We evaluate the effect of the presence of O2 on the green to red-doublet emission intensity ratio, which is traditionally used to assess the CO2 abundance within cometary atmospheres. Model simulations, solving the continuity equation with transport, show that not taking O2 into account leads to an underestimation of the CO2 abundance within 67P, with a relative error of about 25%. This strongly suggests that the green to red-doublet emission intensity ratio alone is not a proper tool for determining the CO2 abundance, as previously suggested. Indeed, there is no compelling reason why O2 would not be a common cometary volatile, making revision of earlier assessments regarding the CO2 abundance in cometary atmospheres necessary. The large uncertainties of the CO2 photodissociation cross section imply that more studies are required in order to better constrain the O(1S) and O(1D) production through this mechanism. Space weather phenomena, such as powerful solar flares, could be used as tools for doing so, providing additional information on a good estimation of the O2 abundance within cometary atmospheres.