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

last_completed_available_date gives ValueError: unconverted data remains: AM #264

Open
SiebertLooijeAtBillyGrace opened this issue Nov 30, 2023 · 5 comments

Comments

@SiebertLooijeAtBillyGrace
Copy link

SiebertLooijeAtBillyGrace commented Nov 30, 2023

Since today the last_completed_available_date gives an ValueError: unconverted data remains: AM.
Did something changed?

File /functions/report_helpers.py", line 53, in download_report
print("LastCompletedAvailableDate: {0}".format(report_container.last_completed_available_date))
File "/local_disk0/.ephemeral_nfs/cluster_libraries/python/lib/python3.10/site-packages/bingads/v13/reporting/report_contract.py", line 16, in last_completed_available_date
return self._report_header.last_completed_available_date
File "/local_disk0/.ephemeral_nfs/cluster_libraries/python/lib/python3.10/site-packages/bingads/v13/internal/reporting/row_report_header.py", line 81, in last_completed_available_date
return datetime.strptime(' '.join(dt_tokens[:2]), '%m/%d/%Y %H:%M:%S')
File "/usr/lib/python3.10/_strptime.py", line 568, in _strptime_datetime
tt, fraction, gmtoff_fraction = _strptime(data_string, format)
File "/usr/lib/python3.10/_strptime.py", line 352, in _strptime
raise ValueError("unconverted data remains: %s" %
ValueError: unconverted data remains: AM

@SiebertLooijeAtBillyGrace SiebertLooijeAtBillyGrace changed the title Download report gives ValueError: unconverted data remains: AM last_completed_available_date gives ValueError: unconverted data remains: AM Nov 30, 2023
@kami2
Copy link

kami2 commented Nov 30, 2023

Data format changes, from '%m/%d/%Y %I:%M:%S %p' to '%m/%d/%Y %I:%M:%S%p'. Could someone open PR?
Line 77 in row_report_headers.py

@dnnspaul
Copy link

dnnspaul commented Nov 30, 2023

Thank you @kami2! Our Microsoft Ads connector broke today with the following error: There is no report data for the submitted report request parameters.. It looks like this is the reason. Can you give me a rough estimate when your fix will be available in the bingads package in pypi?

We quick-fixed it by putting the following line into our dockerfile:
RUN sed -i "s/%I:%M:%S %p/%I:%M:%S%p/g" /usr/local/lib/python3.9/site-packages/bingads/v13/internal/reporting/row_report_header.py

@kami2
Copy link

kami2 commented Nov 30, 2023

@dnnspaul I wish I knew hehe. I never open pull request and this is my first one. I have nothing common with this library (yet). I need that fix same as you. So hopefully soon they merge my PR :D

@dnnspaul
Copy link

@kami2 oh, I wrongly assumed that you are part of the maintainers. Well, fingers crossed for a quick response from them. On my side the fix is working.

@kami2
Copy link

kami2 commented Dec 11, 2023

I am still facing the issue. Is there is a chance to have it fixed soon?

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

3 participants