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

TypeError: 'NoneType' object is not iterable #118

Closed
sebunger opened this issue Jun 6, 2023 · 3 comments
Closed

TypeError: 'NoneType' object is not iterable #118

sebunger opened this issue Jun 6, 2023 · 3 comments
Labels
duplicate This issue or pull request already exists

Comments

@sebunger
Copy link

sebunger commented Jun 6, 2023

Trying to set up giftless as the LFS backend for our mercurial server. I got to the point where I could successfully push new objects into giftless, but when I try to clone a repo with an object stored in GiftLess, I get this:

 * Serving Flask app 'giftless.wsgi_entrypoint' (lazy loading)
 * Environment: development
 * Debug mode: on
2023-06-06 13:07:21,098 werkzeug        INFO  * Running on all addresses (0.0.0.0)
   WARNING: This is a development server. Do not use it in a production deployment.
 * Running on http://127.0.0.1:5000
 * Running on http://10.0.2.15:5000 (Press CTRL+C to quit)
2023-06-06 13:07:21,098 werkzeug        INFO  * Restarting with stat
 * Debugger is active!
 * Debugger PIN: 485-499-891
192.168.5.20 - - [06/Jun/2023 13:07:27] "POST /TTDE/LFTest/objects/batch HTTP/1.1" 200 -
2023-06-06 13:07:27,874 werkzeug        INFO 192.168.5.20 - - [06/Jun/2023 13:07:27] "POST /TTDE/LFTest/objects/batch HTTP/1.1" 200 -
192.168.5.20 - - [06/Jun/2023 13:07:27] "GET /TTDE/LFTest/objects/storage/aa1db5c660d3d1f3f4f9361b9848694300929be94b74c84452a87420c59e5df9?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImtpZCI6ImdpZnRsZXNzLWludGVybmFsLWp3dC1rZXkifQ.eyJleHAiOjE2ODYwMTM3MDcsImlhdCI6MTY4NjAxMzY0NywibmJmIjoxNjg2MDEzNjQ3LCJzdWIiOm51bGwsIm5hbWUiOiJhbm9ueW1vdXMiLCJzY29wZXMiOiJvYmo6VFRERS9MRlRlc3QvYWExZGI1YzY2MGQzZDFmM2Y0ZjkzNjFiOTg0ODY5NDMwMDkyOWJlOTRiNzRjODQ0NTJhODc0MjBjNTllNWRmOTpyZWFkIn0._4pVD0jfYXt0X0Gna1ExK4TpHyr_G9zL3gfCKR_b9Ks HTTP/1.1" 500 -
2023-06-06 13:07:27,879 werkzeug        INFO 192.168.5.20 - - [06/Jun/2023 13:07:27] "GET /TTDE/LFTest/objects/storage/aa1db5c660d3d1f3f4f9361b9848694300929be94b74c84452a87420c59e5df9?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImtpZCI6ImdpZnRsZXNzLWludGVybmFsLWp3dC1rZXkifQ.eyJleHAiOjE2ODYwMTM3MDcsImlhdCI6MTY4NjAxMzY0NywibmJmIjoxNjg2MDEzNjQ3LCJzdWIiOm51bGwsIm5hbWUiOiJhbm9ueW1vdXMiLCJzY29wZXMiOiJvYmo6VFRERS9MRlRlc3QvYWExZGI1YzY2MGQzZDFmM2Y0ZjkzNjFiOTg0ODY5NDMwMDkyOWJlOTRiNzRjODQ0NTJhODc0MjBjNTllNWRmOTpyZWFkIn0._4pVD0jfYXt0X0Gna1ExK4TpHyr_G9zL3gfCKR_b9Ks HTTP/1.1" 500 -
Traceback (most recent call last):
  File "/home/giftless/venv/lib/python3.10/site-packages/flask/app.py", line 2095, in __call__
    return self.wsgi_app(environ, start_response)
  File "/home/giftless/venv/lib/python3.10/site-packages/flask/app.py", line 2080, in wsgi_app
    response = self.handle_exception(e)
  File "/home/giftless/venv/lib/python3.10/site-packages/flask/app.py", line 2077, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/giftless/venv/lib/python3.10/site-packages/flask/app.py", line 1525, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/giftless/venv/lib/python3.10/site-packages/flask/app.py", line 1523, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/giftless/venv/lib/python3.10/site-packages/flask/app.py", line 1509, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
  File "/home/giftless/venv/lib/python3.10/site-packages/flask_classful.py", line 301, in proxy
    response = view(**request.view_args)
  File "/home/giftless/venv/lib/python3.10/site-packages/giftless/auth/__init__.py", line 90, in decorated_function
    return f(*args, **kwargs)
  File "/home/giftless/venv/lib/python3.10/site-packages/flask_classful.py", line 269, in inner
    return fn(*args, **kwargs)
  File "/home/giftless/venv/lib/python3.10/site-packages/giftless/transfer/basic_streaming.py", line 85, in get
    filename = safe_filename(filename)
  File "/home/giftless/venv/lib/python3.10/site-packages/giftless/util.py", line 84, in safe_filename
    return ''.join(c for c in original_filename if c in valid_chars)
TypeError: 'NoneType' object is not iterable

Any idea what's going wrong?

@sebunger
Copy link
Author

sebunger commented Jun 6, 2023

Ok, I have just tried the source install rather than the pip one and that seems to work better. I note pip hasn't been updated in quite a while. Is it perhaps time for another tag and release?

@rufuspollock
Copy link
Member

@sebunger good point. DUPLICATE (at least in your last comment) of #119

@rufuspollock
Copy link
Member

DUPLICATE. #119

@rufuspollock rufuspollock closed this as not planned Won't fix, can't repro, duplicate, stale Dec 25, 2023
@rufuspollock rufuspollock added the duplicate This issue or pull request already exists label Dec 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants