Skip to content
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

Error "Object of class stdClass could not be converted to string" when rendering bibtex output #189

Closed
3 tasks done
hktang opened this issue May 27, 2024 · 1 comment
Closed
3 tasks done

Comments

@hktang
Copy link

hktang commented May 27, 2024

Please follow the general troubleshooting steps first:

  • I read the README and followed the instructions.
  • I am sure that the used CSL metadata follows the CSL schema.
  • I use a valid CSL stylesheet

Bug reports:

It seems "licence" breaks bibtex rendering if it is an object. I am also not sure whether this is an issue with the Bibtex style or with citeproc. For now, as a workaround, I removed the "licence" key from the citeproc metadata object.

Used CSL stylesheet:

bibtex.csl

Used CSL metadata

I am quite sure it's caused by "licence" as I tried unsetting all stdClass objects one by one. The DOI I used for testing is 10.30852/sb.2023.2184 and below is an abridged version:

{
    "issue": "1",
    "license": [
        {
            "start": {
                "date-parts": [
                    [
                        2023,
                        6,
                        27
                    ]
                ],
                "date-time": "2023-06-27T00:00:00Z",
                "timestamp": 1687824000000
            },
            "content-version": "vor",
            "delay-in-days": 0,
            "URL": "https:\/\/creativecommons.org\/licenses\/by-nc\/4.0\/"
        }
    ],
    "content-domain": {
        "domain": [],
        "crossmark-restriction": false
    },
    "DOI": "10.30852\/sb.2023.2184",
    "type": "journal-article",
    "page": "87-101",
    "source": "Crossref",
    "is-referenced-by-count": 1,
    "title": "Climate change risk perceptions, vulnerability, and adaptation in high altitude farming regions of Hindu Kush Himalaya",
    "prefix": "10.30852",
    "volume": "13",
    "author": [
        {
            "ORCID": "http:\/\/orcid.org\/0000-0002-9242-3806",
            "authenticated-orcid": false,
            "given": "Saeed Ahmad",
            "family": "Asad",
            "sequence": "first",
            "affiliation": []
        }
    ],
    "published-online": {
        "date-parts": [
            [
                2023,
                6,
                27
            ]
        ]
    },
    "container-title": "Science Bulletin",
    "original-title": [],
    "score": 1,
    "subtitle": [],
    "short-title": [],
    "issued": {
        "date-parts": [
            [
                2023,
                6,
                27
            ]
        ]
    },
    "references-count": 42,
    "journal-issue": {
        "issue": "1"
    },
    "URL": "http:\/\/dx.doi.org\/10.30852\/sb.2023.2184",
    "relation": {},
    "subject": [],
    "published": {
        "date-parts": [
            [
                2023,
                6,
                27
            ]
        ]
    }
}
@hktang
Copy link
Author

hktang commented May 28, 2024

I think this is a duplicate of #184. Sorry!

@hktang hktang closed this as completed May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant