Вот мой код:
Код: Выделить всё
from refextract import extract_references_from_file
def extract_citations(uploaded_file_location):
try:
citations = extract_references_from_file(uploaded_file_location)
citations = merge_citations(citations)
unique_citations = {}
for citation in citations:
raw_ref = citation['raw_ref'][0]
if raw_ref not in unique_citations:
unique_citations[raw_ref] = citation
else:
pass
unique_citations_list = list(unique_citations.values())
return unique_citations_list
except Exception as e:
print(f"An error occurred: {e}")
return []
Код: Выделить всё
TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType
Код: Выделить всё
FROM python:latest
WORKDIR /app
COPY requirements.txt ./
RUN pip install -r requirements.txt
COPY . .
CMD ["python", "main.py"]
code> функция.
Я уже искал, но не нашел удовлетворительного решения, которое бы мне подошло. Поэтому я рад, что кто-то помог мне это исправить.
Подробнее здесь: https://stackoverflow.com/questions/777 ... r-not-none