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

filename is None sometimes when calling randomtile #67

Open
Wreckstation opened this issue Jul 24, 2022 · 1 comment
Open

filename is None sometimes when calling randomtile #67

Wreckstation opened this issue Jul 24, 2022 · 1 comment

Comments

@Wreckstation
Copy link
Contributor

Traceback (most recent call last):
Jul 24 15:47:28 nugget pipenv[822711]:   File "/home/cryptogull/.local/share/virtualenvs/cryptogull-7iYW>
Jul 24 15:47:28 nugget pipenv[822711]:     ret = await coro(*args, **kwargs)
Jul 24 15:47:28 nugget pipenv[822711]:   File "/home/cryptogull/cryptogull/cogs/tiles.py", line 133, in >
Jul 24 15:47:28 nugget pipenv[822711]:     return await self.randomtile(ctx, "recolor", "random", readin>
Jul 24 15:47:28 nugget pipenv[822711]:   File "/home/cryptogull/.local/share/virtualenvs/cryptogull-7iYW>
Jul 24 15:47:28 nugget pipenv[822711]:     return await self.callback(self.cog, *args, **kwargs)
Jul 24 15:47:28 nugget pipenv[822711]:   File "/home/cryptogull/cryptogull/cogs/tiles.py", line 88, in r>
Jul 24 15:47:28 nugget pipenv[822711]:     return await(process_tile_request(ctx, name, *args, reading=r>
Jul 24 15:47:28 nugget pipenv[822711]:   File "/home/cryptogull/cryptogull/cogs/tiles.py", line 204, in >
Jul 24 15:47:28 nugget pipenv[822711]:     tile = QudTile(filename, colorstring, colors[0], colors[1], q>
Jul 24 15:47:28 nugget pipenv[822711]:   File "/home/cryptogull/.local/share/virtualenvs/cryptogull-7iYW>
Jul 24 15:47:28 nugget pipenv[822711]:     self.filename = fix_filename(self.filename)  # convert _ into>
Jul 24 15:47:28 nugget pipenv[822711]:   File "/home/cryptogull/.local/share/virtualenvs/cryptogull-7iYW>
Jul 24 15:47:28 nugget pipenv[822711]:     if filename.lower().startswith('assets_content_textures'):
Jul 24 15:47:28 nugget pipenv[822711]: AttributeError: 'NoneType' object has no attribute 'lower'
@egocarib
Copy link
Member

Seems to occur because this line is passing a NoneType filename to the QudTile constructor.

cryptogull/cogs/tiles.py

Lines 204 to 205 in 145fd66

tile = QudTile(filename, colorstring, colors[0], colors[1], qudname,
raw_transparent)

This should be fixed in the cryptogull function above, but also should probably be handled better in hagadias in one or both of these places:

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