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

Add '%m.%d.%y' date format for .mpr file timestamps #63

Merged
merged 3 commits into from
Sep 1, 2021

Conversation

chatcannon
Copy link
Collaborator

Closes #60

@chatcannon
Copy link
Collaborator Author

@regcs Could you test this and see if it works with your files?

@regcs
Copy link

regcs commented May 24, 2021

@chatcannon Unfortunately, it still fails with a ValueError:

Traceback (most recent call last):
  File "2021-03-18 CV Auswertung - Figure 1.py", line 116, in <module>
    data_inkjet = read_mpr(file_inkjet, columns=headers, dtypes=dtypes)
  File "2021-03-18 CV Auswertung - Figure 1.py", line 47, in read_mpr
    file = BioLogic.MPRfile(mpr_file)
  File "/opt/anaconda3/lib/python3.8/site-packages/galvani/BioLogic.py", line 404, in __init__
    tm = time.strptime(settings_mod['date'].decode('ascii'), '%m-%d-%y')
  File "/opt/anaconda3/lib/python3.8/_strptime.py", line 562, in _strptime_time
    tt = _strptime(data_string, format)[0]
  File "/opt/anaconda3/lib/python3.8/_strptime.py", line 349, in _strptime
    raise ValueError("time data %r does not match format %r" %
ValueError: time data '11.12.20' does not match format '%m-%d-%y'

@chatcannon
Copy link
Collaborator Author

I see, there are two places with the different time formats but I have only changed one.

@chatcannon
Copy link
Collaborator Author

Try the new version and see if that works.

@chatcannon chatcannon requested a review from bcolsen August 31, 2021 15:22
@chatcannon
Copy link
Collaborator Author

@regcs Any update? If you have no objections then I will merge this and push a new release to PyPI.

@regcs
Copy link

regcs commented Aug 31, 2021

@chatcannon Sorry, I missed that. Looks good to me, thanks!

@chatcannon chatcannon merged commit 3b68a30 into echemdata:master Sep 1, 2021
@chatcannon chatcannon deleted the time-format-dotted branch September 1, 2021 04:07
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

Successfully merging this pull request may close these issues.

[MPR File] ValueError: time data 'XX.XX.XX' does not match format '%m-%d-%y'
2 participants