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

[1.4.RC3] File List API with location broken #3655

Closed
jneilliii opened this issue Jul 26, 2020 · 4 comments
Closed

[1.4.RC3] File List API with location broken #3655

jneilliii opened this issue Jul 26, 2020 · 4 comments
Labels
bug Issue describes a bug done Done but not yet released regression Regression in a release candidate or stable release

Comments

@jneilliii
Copy link
Contributor

What were you doing?

Testing a new android app for octoprint for a Discord user. When loading file list there is a 500 Internal Server error. After further investigation, seems to be broken altogether when using the URL http:///api/files/local?recursive=true

What did you expect to happen?

Recursive file list of all local files.

What happened instead?

500 Internal Server Error

Did the same happen when running OctoPrint in safe mode?

Yes

Version of OctoPrint

1.4.1RC3

Operating System running OctoPrint

OctoPi 0.18

Printer model & used firmware incl. version

N/A

Browser and version of browser, operating system running browser

Google Chrome Version 84.0.4147.89 (Official Build) (64-bit)

Link to octoprint.log

relevant error

2020-07-26 19:05:40,910 - octoprint - ERROR - Exception on /api/files/local [GET]
Traceback (most recent call last):
  File "/home/pi/oprint/local/lib/python2.7/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/pi/oprint/local/lib/python2.7/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/pi/oprint/local/lib/python2.7/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/vendor/flask_principal.py", line 199, in _decorated
    rv = f(*args, **kw)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/server/util/flask.py", line 1109, in decorated_function
    lm = lastmodified_factory()
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/server/api/files.py", line 135, in <lambda>
    request.values.get("recursive", False)),
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/server/api/files.py", line 66, in _create_lastmodified
    storage, path_in_storage = path.split("/", 1)
ValueError: need more than 1 value to unpack
2020-07-26 19:05:41,012 - tornado.access - ERROR - 500 GET /api/files/local?recursive=true (::ffff:192.168.0.119) 111.94ms

Link to contents of terminal tab or serial.log

N/A

Link to contents of Javascript console in the browser

N/A

Screenshot(s)/video(s) showing the problem:

N/A

I have read the FAQ.

@jneilliii
Copy link
Contributor Author

I've tested in 1.4.0 just now and this issue does not occur.

@foosel foosel added bug Issue describes a bug and removed triage This issue needs triage labels Jul 27, 2020
@foosel
Copy link
Member

foosel commented Jul 27, 2020

Looks like a nasty side effect of the fix to #3422

foosel added a commit that referenced this issue Jul 27, 2020
@foosel foosel added the done Done but not yet released label Jul 27, 2020
@foosel
Copy link
Member

foosel commented Jul 27, 2020

Fixed by the above commit, ready for 1.4.1rc4.

@foosel foosel added the regression Regression in a release candidate or stable release label Jul 27, 2020
@foosel
Copy link
Member

foosel commented Jul 29, 2020

1.4.1rc4 has just been released.

@foosel foosel closed this as completed Jul 29, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue describes a bug done Done but not yet released regression Regression in a release candidate or stable release
Projects
None yet
Development

No branches or pull requests

3 participants