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 Due to string literal in File Name #23

Open
ashwath98 opened this issue Feb 26, 2020 · 5 comments
Open

Error Due to string literal in File Name #23

ashwath98 opened this issue Feb 26, 2020 · 5 comments

Comments

@ashwath98
Copy link

One of the errors that occur in step 3 is the following (Process the video )

File "hmr/demo.py", line 194, in
all_files.sort(key=lambda x: int(x.split('/')[-1].split('.')[0]))
ValueError: invalid literal for int() with base 10: 'abc002'

which is due to the input file name being abc, which causes the error during conversion in the lambda function

to fix this what is the suggested action?

  1. Should I change the file name to some integer only? But if I assign an integer value that might mess up the sort function as all filenames will be prefixed with that integer value
    OR I can name the input file as '0'
  2. I can remove the part where the filename is added to the number during the CSV file generation

Also to make the code compatible with tf 1.15 I had to make some small changes to
config.py, batch_lbs.py and models.py in your hmr repo,
should I make a PR describing that? ( I don't think it is needed it's only 4 changes)

@Norod
Copy link

Norod commented Mar 11, 2020

Had the same issue, so it happened that "all_files" was already sorted at this point, so simply commented out #all_files.sort. But I guess it's not something to count on for always happening, as it's probably a file-system / platform dependent thing :/

@danielcitron
Copy link

I commented out #all_files.sort but then when i open the bvh file, the motion capture data is completely out of order. Did you ever figure out a different solution besides just commenting out?

@ashwath98
Copy link
Author

Change the filename to an integer

@Norod
Copy link

Norod commented Apr 16, 2020

Did you ever figure out a different solution besides just commenting out?

I didn't try

@amar8600
Copy link

amar8600 commented Sep 9, 2020

just remove the int from the all_files sort line like this "all_files.sort(key=lambda x: x.split('/')[-1].split('.')[0])".It will work fine

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

4 participants