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

Exception with mal-formatted data #27

Closed
FichteFoll opened this issue Mar 22, 2015 · 2 comments
Closed

Exception with mal-formatted data #27

FichteFoll opened this issue Mar 22, 2015 · 2 comments

Comments

@FichteFoll
Copy link

I initially temp-saved the data into a text editor, which replaced all tabs with spaces (which I only found out to be a problem later). I replaced most of the wrong spaces with tabs again using regualr expressions, but one was missing: the first line in the Rotation section. Don't ask me how that could happen.

While I would normally suggest to accept spaces as well, I guess relying on correctly formatted data is reasonable and simplifies the parsing since all separators are tab characters. Either way, it would probabaly be better if the error was caught.

The Traceback:

Lua reported a runtime error:
    File "C:/Users\Fichte\AppData\Roaming\Aegisub\automation\autoload\Aegisub-Motion.moon", line 476
<anonymous function at lines 350-489>
    File "C:/Users\Fichte\AppData\Roaming\Aegisub\automation\include\a-mo\MotionHandler.moon", line 89
applyMotion
    File "C:/Users\Fichte\AppData\Roaming\Aegisub\automation\include\a-mo\MotionHandler.moon", line 167
method
    File "C:/Users\Fichte\AppData\Roaming\Aegisub\automation\include\a-mo\DataHandler.moon", line 107
calculateCurrentState
attempt to perform arithmetic on a nil value

The Data: http://dpaste.com/0WMR05K (github auto-replaces tabs with spaces in comments)

@torque
Copy link
Contributor

torque commented Mar 22, 2015

Thanks for the report. Will fix soon.

@FichteFoll
Copy link
Author

Small note that I found a few other missing tabs in other headers later that resulted in either the same or a similar traceback.

@torque torque closed this as completed in 42e0cc6 Mar 23, 2015
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

2 participants