Skip to content

UnboundLocalError: local variable 'element' referenced before assignment #249

@Mozejuice123

Description

@Mozejuice123

self.ecb = sdmx.Request('ECB')
for currency in currencies:
key = dict(CURRENCY = currency, CURRENCY_DENOM = source_currency, FREQ='D', EXR_SUFFIX='A')**

Error happens here
** data = self.ecb.data('EXR',** key=key, params=parameters)

I get this output when running the code.
** local variable 'element' referenced before assignment
lxml.etree.XMLSyntaxError: no element found (line 0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions