diff --git a/Pipfile b/Pipfile index 99e05a9..9a528d3 100644 --- a/Pipfile +++ b/Pipfile @@ -7,7 +7,7 @@ name = "pypi" attrs = ">=24.2.0" bs4 = ">=0.0.2" charset-normalizer = ">=3.4.0" -django = ">=5.1.0" +django = ">=5.1.3" GTC = ">=1.5.1" gunicorn = ">=23.0.0" html5 = ">=0.0.9" @@ -17,7 +17,7 @@ owlready2 = ">=0.47" pnglatex = ">=1.1" pylatexenc = ">=2.10" pymysql = "==1.1.1" -pytz = ">=2024.2" +pytz = ">=2024.1" pyyaml = ">=6.0.2" qwikidata = ">=0.4.2" rdflib = ">=7.1.0" diff --git a/dashboard/example.py b/dashboard/example.py index 3f84e9c..9070e13 100644 --- a/dashboard/example.py +++ b/dashboard/example.py @@ -732,18 +732,19 @@ quant['sect'] = None if 'isq' in keys: isq = q['isq']['value'] - tmp = re.findall(r'alttext="\{(.+?)}"', isq) - isq = (tmp[0].replace("\\displaystyle", '').replace("\\mathsf", '').replace(' ', ''). - replace('{{', '').replace('}}', '')) - quant['isq'] = isq + if 'merror' in isq: + quant['isq'] = None + else: + tmp = re.findall(r'alttext="\{(.+?)\}"', isq) + isq = (tmp[0].replace("\\displaystyle", '').replace("\\mathsf", '').replace(' ', ''). + replace('{{', '').replace('}}', '')) + quant['isq'] = isq else: quant['isq'] = None qnt = None if quant['source'] and quant['sect']: num = re.findall(r'([A-Z]{3}) 80000-(\d+?):', str(quant['source'])) isocode = num[0][0] + '-80000-' + num[0][1] - print(isocode) - # search the quantities table for quantity based on the source and section found = Quantities.objects.filter(iso_source=isocode, iso_item=quant['sect']) if found: diff --git a/static/umis_quants_query_112024.json b/static/umis_quants_query_112024.json index c033830..1d6b0b8 100644 --- a/static/umis_quants_query_112024.json +++ b/static/umis_quants_query_112024.json @@ -216,7 +216,7 @@ { "qntid": "http://www.wikidata.org/entity/Q11376", "quant": "acceleration", - "isq": "\n \n \n \n \n \n L\n \n \n \n \n \n T\n \n \n \n \n 2\n \n \n \n \n {\\displaystyle {\\mathsf {L}}{\\mathsf {T}}^{-2}}\n \n", + "isq": "\n \n \n \n \n \n L\n \n \n \n \n \n T\n \n \n \n \n 2\n \n \n \n \n {\\displaystyle {\\mathsf {L}}{\\mathsf {T}}^{-2}}\n \n", "source": "ISO 80000-3:2019 Quantities and units — Part 3: Space and time", "sect": "3-9.1" },