-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weâll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Correction du bug de la valeur de retour de getIdealFontSize() null --> 0 đ #19
Open
JV-conseil
wants to merge
9
commits into
LAB-MI:main
Choose a base branch
from
JV-conseil-Internet-Consulting:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
La valeur de retour de la fonction getIdealFontSize() doit ĂȘtre de type numĂ©rique, Ă dĂ©faut 0 mais pas `null` ! Sinon la crĂ©ation du PDF est buggĂ©e: « Uncaught (in promise) TypeError: `options.size` must be of type `number` or `n`, but was actually of type `null` ».
#!/usr/bin/env python3.8
# -*- coding: UTF-8 -*-
"""Simple test en langage Python pour connaĂźtre le nombre de villes
dont l'intitulé compte un nombre de caractÚres supérieur à 19.
Base officielle des codes postaux fournie par data.gouv.fr (28 mars 2017 10:15) :
https://www.data.gouv.fr/fr/datasets/base-officielle-des-codes-postaux/#resource-554590ab-ae62-40ac-8353-ee75162c05ee
"""
import logging
import sys
__author__ = "JV conseil â Internet Consulting"
__copyright__ = "Copyright (c) 2021, JV conseil â Internet Consulting, All rights reserved."
__credits__ = ["JV-conseil"]
__license__ = "BSD 3-Clause License"
__version__ = "1.0.0"
__maintainer__ = "JV-conseil"
__email__ = "contact@jv-conseil.net"
__status__ = "Development"
try:
import pandas as pd
except ImportError:
sys.exit("""You need pandas!
install it from http://pypi.python.org/pypi/pandas
or run pip install pandas""")
# Logs
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
data_csv_url = 'https://www.data.gouv.fr/fr/datasets/r/554590ab-ae62-40ac-8353-ee75162c05ee'
try:
df = pd.read_csv(data_csv_url, sep=';', na_filter=False).to_dict(orient='records')
ville_11 = {d['Code_postal']: (d['Nom_commune'], d) for d in df if len(d['Nom_commune']) > 19}
ville_11 = list(sorted(ville_11.values(), key=lambda x: x[0]))
print("### Si votre lieu de résidence et/ou de naissance compte parmi les {} villes listées ci-dessous l'[Attestation de déplacement dérogatoire numérique](https://media.interieur.gouv.fr/attestation-deplacement-derogatoire-covid-19/) ne fonctionnera pas :".format(len(ville_11)))
for i, v in enumerate(ville_11, 1):
print('{}. {} ({})'.format(i, v[0], v[1]['Code_postal']))
except Exception as e:
logger.exception(e) |
This was referenced Mar 27, 2021
@JV-conseil Could you rebase your branch to remove conflicts ? |
La valeur de retour de la fonction getIdealFontSize() doit ĂȘtre de type numĂ©rique, Ă dĂ©faut 0 mais pas `null` ! Sinon la crĂ©ation du PDF est buggĂ©e: « Uncaught (in promise) TypeError: `options.size` must be of type `number` or `n`, but was actually of type `null` ». npm update --dev --verbose đ Update README.md Update README.md Update pdf-util.js Update package.json
Signed-off-by: JV conseil <contact@jv-conseil.net>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
La valeur de retour de la fonction
getIdealFontSize()
doit ĂȘtre de type numĂ©rique, Ă dĂ©faut 0 mais pasnull
!attestation-deplacement-derogatoire-covid-19/src/js/pdf-util.js
Lines 195 to 204 in 19cca14
Sinon la crĂ©ation du PDF est buggĂ©e et l'attestation n'est pas gĂ©nĂ©rĂ©e đ«
Issue đ #20