#dev-contrib
1 messages Β· Page 41 of 1
It does
but when I clicked it, said I am not allowed (I was trying to batch them together for what it's worth)
Yeah I was doing that
Just make the commit message nicer than the default :^)
What do you want to put as commit message?
The fix KeyError blahblahblah I wrote
Yes
I pushed some commits yesterday so either my permissions were revoked or GitHub has an issue (I have not tried pushing via command line git now because I have nothing else to push)
@tawdry vapor I failed logging 101
could you give me a brief explanation to know when to use which? it's not totally obvious to me :c
Sure there is a good SO answer on this https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels
thanks
the debug vs info one can be a bit ambiguous but just think about in what situations it'd be helpful for you to see the message
by the way, I think there's another bug in some of the moderator modules (which is present in the upstream)
iirc the functions that send a DM to the user don't check if the user argument is an actual discord.User/Member
so if it's a discord.Object it fails to send the message
kinda minor bug because the bot can't send messages if they don't share the server I think (might be wrong of this), but regardless, the exception breaks the function and the "<x> applied to whatever" doesn't show up
I should prolly check it, I might be wrong
Yeah I already commented about that in the review
It's not really how you describe it though
You are right it doesn't check the type. However, the parameters are correctly annotated - they don't specify that a discord.Object is allowed
But there's no place where something other than a user or member is given as far as I can see
Regarding the can't share server thing, I don't know, but the function should catch those exceptions so it's fine.
ah, I meant it in a way that the banned user wouldn't know even if it didn't fail
async def send_private_embed(user: UserTypes, embed: discord.Embed) -> bool:
# ...
await user.send(embed=embed)```
(no .send method in discord.Object)
Yeah I understand
But it will never fail in practice
Yes, there are no actual safeguards against it
But nothing is currently broken as far as I can tell regarding that
IMO it should just raise the exception because a discord.Object should never be given to that function anyway, and that is made clear by the function annotations
I'll leave it then
You could catch the attributeerror and use log.exception
Sorry, it doesn't actually need to raise it. I said that cause I was interested in the traceback, and that can just be logged without raising it
If you want you can add it. I think it's OK either way
nvm I just now understand what you said
@tawdry vapor what do you mean by
This
fetch_userneeds to be addressed somehow (e.g. skip DM if user is a proxy) because otherwise it will raise an error
in relation with this? https://github.com/python-discord/bot/blob/3b6c7d88695fa6703ab94786b3ec8aade32f9c3e/bot/cogs/moderation/scheduler.py#L110
I am unclear in which case it would raise an error, since that's making it a proper user... you mean I should catch possible exceptions if that fetch fails?
Yeah that is what I meant, sorry
Just catch the exception is OK
When I wrote that I was thinking it would fail again but maybe the fetch will work even though it failed in the converter.
depends
if the fetching in FetchedUser fails but returns a discord.Object, that discord.Object might be incorrect
really low chances for that to happen though
but if it fails completely apply_infraction won't be even called
@long garnet If you didn't know, you could have batched my review suggestions and committed them via GitHub
It looks like you manually did the changes
I also do this a bit on purpose because I want to avoid using the GitHub tools as much as possible
same with working with forks and not a branch
it helps me keep learning
@tawdry vapor
try:
if not isinstance(user, (discord.Member, discord.User)):
user = await self.bot.fetch_user(user.id)
except discord.HTTPException as e:
log.error(f"Failed to fetch user `{user.id}`: status {e.status}")
else:
# Accordingly display whether the user was successfully notified via DM.
if await utils.notify_infraction(user, infr_type, expiry, reason, icon):
dm_result = "π¨ "
dm_log_text = "\nDM: Sent"
else:
dm_result = f"{constants.Emojis.failmail} "
dm_log_text = "\nDM: **Failed**"```about to do the last commit, does this look good?
not sure what's failing there
cant have a space after it
No, I'm about to
π
I did test the watching channel ones
those are commited already
I nominated absent-lemon in my server, amazing
Yeah it is a bit odd to nominate someone that isn't in the server π€
well, it's a side effect
if it gets to the proxy then it's because the bot doesn't know if it's in the server or not
and if they use proxy in the watching modules then I assume they wanted to watch/nominate people in that case too
(though yeah, why nominate? I'd rather have it fail)
All the members in the guild should already be in the cache unless something is really wrong with Discord at that time
(watching for supervision makes some sense)
ah, that try-except is wrong because those vars in else: are used afterwards anyway lol
if not infraction["hidden"]:
dm_result = f"{constants.Emojis.failmail} "
dm_log_text = "\nDM: **Failed**"
# Sometimes user is a discord.Object; make it a proper user.
try:
if not isinstance(user, (discord.Member, discord.User)):
user = await self.bot.fetch_user(user.id)
except discord.HTTPException as e:
log.error(f"Failed to fetch user `{user.id}`: status {e.status}")
else:
# Accordingly display whether the user was successfully notified via DM.
if await utils.notify_infraction(user, infr_type, expiry, reason, icon):
dm_result = ":incoming_envelope: "
dm_log_text = "\nDM: Sent"```like with a default value?
Yeah
That's basically what it was doing anyway, I think
I just used an else originally to make it more readable
hm, this is a bit confusing imo
the two links go to the intros for non-programmers and programmers but there is no description of that at all
They don't point to the sane link?
I think this page in itself is misleading anyway
no hover text that i can see
Not sure if this is known already or not, but if there are exactly 11 lines of output the bot will output 10. At 12 lines it will begin to upload the output to a paste
Yes, looks like a bug
I'm searching through the issues but I don't think it has been already reported
Doesn't look like there is one, do you mind opening an issue please?
I'll do so
!e
print(*range(11), sep="\n")
@hardy gorge :white_check_mark: Your eval job has completed with return code 0.
001 | 0
002 | 1
003 | 2
004 | 3
005 | 4
006 | 5
007 | 6
008 | 7
009 | 8
010 | 9
Interesting.
I'll try to batch some eval related issue later today
Now that it support external libraries, I think it is a good time to upgrade it
Can't create a draft PR without any commit?
That sucks
Guys.. I have a small issue..
I have an AttributeError: SIGKILL on elif returncode == 128 + Signals.SIGKILL:, but when I use jump to definition, it is clearly defined
Line 104 in \bot\cogs\snekbox.py (https://github.com/python-discord/bot/blob/master/bot/cogs/snekbox.py#L104) if you wanna check out
complete traceback?
what operating system are you on?
looks like this constant might not exist on windows
the signals module does not guarantee the presence of all the signals on every OS
it's platform dependant
There is no SIGKILL on windows?
Hmm, seems kind of logic
windows does have SIGKILL, sort of
there isn't actually a signal for it
it just fucking murders the process
that's not the point, the point is that there's no SIGKILL constant in the Signals IntEnum if you're on windows
Windows, the process murderer
NsJail cannot even run on Windows in the first place
NsJail is linux only. It relies on groups among other linux only features. It fundamentally cannot work on Windows
yeah I'm not sure why you're trying to spin this up on windows.
Maybe snekbox will start but should you try to use it, it wont work
Oops, meant to write cgroups not groups
anyway if we were going to fix this, I'd simply add an elif extra before the failing one that looks for a SIGTERM
I just want to work with the bot-side interface
Oh this is on the bot?
Yep
OK, sorry then
I want to work on a few snekbox enhancements, I can fix it
Yeah, I should have specified it, my bad
You did I just suck at reading
elif returncode == 128 + Signals.SIGTERM or returncode == 128 + Signals.SIGKILL:
msg = "Your eval job timed out or ran out of memory"
maybe this is fine?
Nope
Since the returncode comes from a linux process, it should just subtitute sigkill with the hardcoded value. I think using sigterm would be incorrect
Unless sigterm on Windows has the same value sigkill does on linux
hm.
I probably used the signals enum cause it's clearer than having some hardcoded integer
well write some code above then that tries to resolve first SIGKILL and then SIGTERM to an int, and then use that in the check.
we can even just define our own SIGKILL that will conditionally be equal to SIGTERM if SIGKILL doesn't exist
SIGTERM will always exist on windows.
then check against that
But if I run
!e import time
time.sleep(10)```It does not say that it timed-out
But do we really care?
I think you misunderstood my point. SIGKILL is equal to integer 9 on linux. Therefore, unless SIGTERM on Windows also equals 9, then SIGTERM cannot be used. It's probably better to say SIGKILL = 9 in some constant.
why
Hard coding 9 does work though
I don't understand why that would be the case at all.
can you walk me through it, @tawdry vapor
But using Signals.SIGTERM does not work
Because NsJail will always return the same code, the platform doesn't matter
The returncode is returned by the snekbox API. So this return code is the return code of the Python process that NsJail ran. Importantly, this process ran in the context of a linux machine. Therefore, the returncode has to be interpreted as a linux return code regardless of where the code that interprets it is running.
wait no, never mind. I get it. because the code is executing inside a linux system.
yeah
fine then, let's just make a SIGKILL constant which equals 9
Oki
and use that
but what about this line
name = Signals(returncode - 128).name
is this safe?
Yeah it's in a try except but on Windows may not be accurate if it has different return codes
So it could return an incorrect signal name? Not sure
It's only for display purposes
iunno, probably just more likely to trip the ValueError
Signals changes depending on the platform, don't think it would work
don't think what would work
name = Signals(returncode - 128).name
it'll work for whatever signals are available
which seems to be the point of that line
I don't think it's worth the bother trying to make this platform independent (probably by creating our own enum with the hardcoded linux signals)
sounds like this is solved
I just have a last question, where do I put the constant?
with the rest of them
I mean, in which category?
I don't understand
There are like 6 constants at the top of the module
just put it there
Oh, not in the config file, okay (make sense actually)
config file constants are for things you need to use in many different modules
Draft PR opened!
Do we still need to ask to be assigned, or we can do that ourselves now?
(Or I don't really need to assign myself since it is written linked a pull request that will close this issue on the issue?)
Yes, you should still ask to be assigned
You should have done that before you opened your PR really
It's just to make sure we don't run into issues with multiple people working on the same thing
One of them has been opened by me, should I still ask?
Yeah, that was silly, sorry
But I haven't started working on it yet
Thanks!
The one who opens an issue is not necessarily the same person as who's going to work on it, so you should still be assigned.
I have a question regarding assignment permissions on github - as contributors we have the ability to assign people to issues, but we're advised not to self-assign but ask a core dev instead. This is entirely reasonable to me, but I'm wondering why we then have the permission - is it so that we can we assign others? For example I've now come across https://github.com/python-discord/bot/issues/602 which alberthdev has been working on since October and they even have a PR in progress at https://github.com/python-discord/bot/pull/633, and they commented under another issue at https://github.com/python-discord/bot/issues/599, but they aren't assigned on either issue. So I suppose the question I have is then is it ok if I come across such an issue that I assign the person myself, I'm just not supposed to assign my own self? Otherwise if only core devs are supposed to assign, then I think it would make sense to strip the permission from roles below.
Additionally if I wish to be assigned on multiple issues such as https://github.com/python-discord/bot/issues/553#issuecomment-568613672, is it necessary that I actually go and leave a comment under each specific one and then wait?
Regarding why you are permitted to assign, it's because GitHub doesn't allow for configuring permissions to such fine degree.
Oh ok, I didn't know that
We'll get back to you on the other questions
Perfect thanks
Can someone quickly review this please? (just a one line addition in the config file) https://github.com/python-discord/bot/pull/683
Thanks lemon!
Where does !eval really execute the code? An online compiler? Which one is it?
we wrote our own, @snow zealot
can I access it, outside of the bot?
Uhm, are there directions somewhere on how I would go about doing that? I'm not sure what self-hosting is
I think there are some directions in the repo readme, but it's not uncomplicated.
I've heard repl.it will bring back an API soon
so hopefully this sort of thing won't be so hard in the future.
uhm, the only one I really really liked, was rextester.com
which isn't even famous
and now they're gonna get shut down due to lack of funds
hence the sudden interest
hmm. I see.
Also
why did y'all write your own compilers when free online compilers exist? Security reasons or something else?
probably mostly because we could
it was a fun challenge to solve
and it allows us more granular control
oh okay.
if you use docker, it's pretty simple to host
assuming you just wanted to play with it at least.
something like this maybe if defined in a compose
version: 3.7
services:
snekbox:
image: pythondiscord/snekbox
ports:
- 8060:8060
privileged: true
init: true
environment:
- DEBUG=True # for log levels, optional
mhm, no I don't use docker but I can sure download it and learn bout it
and yes, I'm looking to play around with it in the sense that I'd like it to be my replacement for compilers when rextester goes down, and when I'm not in the mood for spyder(because spyder takes a whole darn minute to load while rextester took 3 seconds to open)
?
It appears @patent pivot disabled the widget api making it no longer able to get the member count
Ah so we do use it
The reason it was disabled was because it was letting listing sites harvest membership and user data for the server
so I asked if we were using it and I was told we weren't
if we do need that we can bring it back
that's unfortunate. would be nice if https://shields.io/ would be able to use in it's place an invite code instead, as that would provide the same data
I could try contribute that
i had a look at their github and it appears it's entirely js
no relevant issues open for it atm
And what is the problem with the listing sites? Isn't that a good thing?
not really
if they're getting membership data regarding individual members, we'd rather not have them using us like that
It's not listing sites, it's sites that take in a user ID and show anyone every discord server they are in
they've got no permission from us and discord don't provide that data by default
so for privacy, why leave the hole open
especially for something as small as member count
i personally hadn't known that this was a thing otherwise i wouldn't have used it
Oh, they have access to user data too? Yeah, that's a problem haha
yeah it makes sense i guess. the widget is for showing a preview into the server
yeah it makes it possible to do stuff like search for a member and see all the servers they're on
all the ones with widgets enabled, at least
which is certainly an invasion of privacy
pretty lame, yep
doesn't matter who, but this is important enough to probably make an issue for
Could we not create our own badge? Shouldn't be that hard
lol why add another thing to maintain
I can see if I can get shields to make an invite based one
badges aren't that important. but it's not like they can't add it to shields.io themselves yeah
just the invite code as an input would be plenty, as we're already using the invite as the link so having it in the badge img url shouldn't be an issue
I'll play around with that in a bit
would be fun to have some custom badges, though.
total member count
online member count
bot currently online
bet the site could host such custom badges real easily.
but yeah, stupid to add another thing to maintain
we're having a hard time keeping up with our current set of features as it is
first two we can do through shields
if we get stats going, then i see no issue with that. but not as a standalone
certainly not something to do right now either way
the only custom badge i'd like to see though is one for github actions. their one is lame because of their crappy svg generation and font styling
unless shields.io adds one for it too
then it would be good π
i'm getting this warning when running the bot's test suite
/home/kwzrd/Code/pydis-bot/bot/bot.py:21: DeprecationWarning: The object should be created from async function
resolver=aiohttp.AsyncResolver(),
/home/kwzrd/.local/share/virtualenvs/pydis-bot-ULHzK8dH/lib/python3.7/site-packages/aiohttp/connector.py:730: DeprecationWarning: The object should be created from async function
loop=loop)
i think this was changed recently to reduce the amount of spawned threads, just asking if we're aware of the deprecation warning
additionally i'd like to ask, I have the following namedtuple
class Case(NamedTuple):
recent_messages: List[MockMessage]
culprit: Tuple[str]
total_attachments: int
I use it to represent test cases for antispam rules, so I'm redefining it in multiple modules - I'd like to put it somewhere from where I can import it instead, but I'm not sure if it's generic enough to actually go into tests.helpers.py, would it be reasonable to create a tests.bot.rules.helpers.py module and put it there? it's only used by the rules tests, but i'm not sure if it's a good idea to have two separate helpers modules, or if its a good idea to even import it as it's really just 4 lines of code
@tough imp I think we are aware of that deprecation warning but that one is coming from aiohttp, so as our dependencies continue to update, it shouldn't be an issue
oh right ok, makes sense thanks
@clever wraith ah, I thought you meant "updates on what's going on, what's the status", not "is snekbox going to be updated?"
it should be updated at some point, yeah, but I'm not the best person to say it
don't consider me a representative of the PyDis projects in any way, I am not
f = open('/dev/kmsg', 'rb'); import os; s = os.dup(f.fileno()); f.close(); import fcntl; fcntl.fcntl(s, fcntl.F_SETFL, os.O_NONBLOCK); print(os.read(s, 1000))
reads from host kmsg
I can also access /dev/mem which appears to read from host memory (!), but not from within nsjpy, just from the dev shell, so I'm not sure how 'dangerous' that is
Thankfully neither allow me to open them RW
paging @ionic tundra
best you guys work together on this if you're both working on a fix
the above may be interesting
!eval print(2+4+4)
@crude gyro :white_check_mark: Your eval job has completed with return code 0.
10
meanwhile I restored it
!e ```py
f = open('/dev/kmsg', 'rb'); import os; s = os.dup(f.fileno()); f.close(); import fcntl; fcntl.fcntl(s, fcntl.F_SETFL, os.O_NONBLOCK); print(os.read(s, 1000))
@sharp timber :white_check_mark: Your eval job has completed with return code 0.
b'4,315748,5791942185539,-;[UFW BLOCK] IN=eth0 OUT= MAC=f2:3c:91:94:ff:2f:50:87:89:40:a1:c1:08:00 SRC=183.81.105.54 DST=172.104.139.207 LEN=40 TOS=0x00 PREC=0x00 TTL=55 ID=63023 PROTO=TCP SPT=18361 DPT=23 WINDOW=29065 RES=0x00 SYN URGP=0 \n'
maybe as a plan b some extra safety measure could be implemented into @stable mountain itself, to check on the snekbox periodically and restore it if it's malfunctioning
or a rate-limited user command to run a snekbox welfare check
I'm also able to write to /dev/
Specifically, /dev/mem{int}
So /dev/ isn't inheriting the "read only file system" protection?
The changes aren't mirrored outside of the container, but it seems that as long as the docker container is still up, it's maintaining a parallel storage space for written files, and they are not reset by snekbox/nsjail
oh dear
The question is, where is it doing that
Let's find out.
uh oh
Well I learned two things
- nsjail blocks writing to outside of /dev
- this is because /dev is mounted via tmpfs
i added this to the nsjail args:
'-m', 'none:/dev:tmpfs:size=0',
which seems to be working
but im way out of my depth here
so not sure if thats even correct syntax or what
!e ```py
n = open("/sys/fs/cgroup/memory/NSJAIL/memory.limit_in_bytes", "r")
print(n.read())
@sharp timber :white_check_mark: Your eval job has completed with return code 0.
52428800
!e ```py
n = open("/sys/fs/cgroup/memory/NSJAIL/memory.limit_in_bytes", "w")
print(n.write("8888888888"))
@sharp timber :white_check_mark: Your eval job has completed with return code 0.
10
!e ```py
n = open("/sys/fs/cgroup/memory/NSJAIL/memory.limit_in_bytes", "r")
print(n.read())
@sharp timber :white_check_mark: Your eval job has completed with return code 0.
8888885248
@sharp timber :x: Your eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 3, in <module>
003 | MemoryError
004 | 0
005 | 1
!e ```py
import sys
n = [0]1024
print(sys.getsizeof(n))
print(sys.getsizeof(n50))
print(sys.getsizeof(n*8000))
@sharp timber :white_check_mark: Your eval job has completed with return code 0.
001 | 8248
002 | 409656
003 | 65536056
!e ```py
import sys
n = [0]1024
print(sys.getsizeof(n))
print(sys.getsizeof(n50))
print(sys.getsizeof(n*80000))
!e ```py
n = open("/sys/fs/cgroup/memory/NSJAIL/memory.limit_in_bytes", "w")
print(n.write("8888888888"))
@sharp timber :white_check_mark: Your eval job has completed with return code 0.
10
!e ```py
import sys
print(sys.getsizeof([0]102410000))
Hello guys, apparently meta broke snekbox hehe? I'm working on some bot-side improvements (https://github.com/python-discord/bot/pull/710), if I can add any first aid fix, let me know! :D
@sharp timber :white_check_mark: Your eval job has completed with return code 0.
81920056
NSJail is not blocking write access to it's own configuration
Unless I'm reading the above wrong, I just managed to make an array 81mb in size, but the memory limit is supposed to be 54mb
Hmm, maybe it has something to do with the recent image change
!e ```py
n = open("/sys/fs/cgroup/memory/NSJAIL/memory.limit_in_bytes", "w")
print(n.write("888888888899"))
@sharp timber :white_check_mark: Your eval job has completed with return code 0.
12
!e ```py
n = open("/sys/fs/cgroup/memory/NSJAIL/memory.limit_in_bytes", "r")
print(n.read())
@sharp timber :white_check_mark: Your eval job has completed with return code 0.
888888885248
@sharp timber @tawdry vapor
https://github.com/0xf0f/snekbox/pull/1
here are my changes so far. dummy mounts for both /dev and /run also block access to multiprocessing.shared_memory
!e ```py
import sys
print(sys.getsizeof([0]102420000))
@sharp timber :white_check_mark: Your eval job has completed with return code 0.
163840056
same method could be used to cut off access to other scary directories
!e ```py
import sys
print(sys.getsizeof([0]102450000))
@sharp timber :warning: Your eval job timed out or ran out of memory.
[No output]
We have changed a couple of weeks ago the base image from alpine to Debian buster
(oh wow thanks wifi)
Not sure what limit I'm hitting now, it's around 160/170mb
And can you try doing the same thing, but for / @ionic tundra?
i did some googling and apparently nsjail doesnt support that
it's only for specific directories/subdirectories
or maybe i misunderstood
i feel like a dummy mount for / will unintentionally break a lot of things
"-R/usr", "-R/lib", "-R/lib64",
Not sure if it would, because the eval process itself will be mounted in read-only, which is what we want
these ones are deliberately mounted
it wouldnt be a question of read-only-ness. if there's nothing mounted at / then it might prevent access to files which need to be mounted.
at least that's my concern
full disclouse though: im way out of my depth here. never really had to tackle this sort of thing.
so will defer to others here who are more knowledgeable on these subjects.
Me neither, but I think putting thoughts into it can help anyway
I don't really see why the eval process would need some files in rw
im not saying they would need to be in rw
maybe some libraries need access to binaries in those folders
Because.. Running a python file doesn't need write access right? Plus, / is supposed to be in write-only right now
Some libraries? Hmm
But the problem might be from NsJail, because --chroot / is supposed to mount the entire filesystem in read-only
I don't think you can get away from the process limit, and since you can't get out of that you can't really break out of nsjail in the first place, the only issue is the write access problem
Which is entirely because for whatever reason, /sys/fs/cgroup and /dev are being mounted as tmpfs' with read-write privileges
./dev might be more difficult to handle, since writing to /dev/stdout is "printing to out". For /sys/fs/cgroup, that's being written to from within snekbox/nsjail.py
I'm actually not sure why at all that needs to be writeable--the parameters are also being passed to nsjail via subprocess? Someone with more experience can probably answer that
In addition, the docker container is running in priviledged mode? It shouldn't be--that might be the source of some of these things like being able to read from /dev/mem / /dev/kmsg
I think NsJail needs to be privileged to be able to run
!e ```py
import os
print(os.listdir("/snekbox"))
@sharp timber :white_check_mark: Your eval job has completed with return code 0.
['Pipfile', 'Pipfile.lock', 'LICENSE', 'tests', 'snekbox', 'docker', '.venv']
in my tests dummy mount /dev doesnt seem to be affecting stdout
but it is blocking /dev/shm
But I don't really think you were able to do that in previous snekbox versions
If someone here could try to rollback to a4a8805587dc8e011fc2aa4276cc71631c58702a and try those to see if they work, that would be great (I'm not on my computer sadly)
In addition, the docker container is running in priviledged mode? It shouldn't be--that might be the source of some of these things like being able to read from /dev/mem / /dev/kmsg
I don't know, but someone in the <@&409416496733880320> group probably knows exactly how it's set-up. If that is the case and it is the source of many of the writeability issues, we should probably look into not running it in privileged mode. (I've added a ping just so this gets seen by the right people.)
I don't remember. @tawdry vapor knows more about snekbox's setup than most of us
Someone mentioned that NSJail requires it
i think it's because of nsjail and the initialisation of the environment
yeah, I think nsjail needs it
although aren't we running user code under a different uid anyway?
might be this
_create_parent_cgroups
we can just add that step to the image creation stage though
Here's the errors from dropping --privileged:
[E][2019-12-28T11:13:47+0000][15] bool subproc::runChild(nsjconf_t*, int, int, int)():457 nsjail tried to use the CLONE_NEWCGROUP clone flag, which is supported under kernel versions >= 4.6 only. Try disabling this flag: Operation not permitted
[E][2019-12-28T11:13:47+0000][15] bool subproc::runChild(nsjconf_t*, int, int, int)():465 clone(flags=CLONE_NEWNS|CLONE_NEWCGROUP|CLONE_NEWUTS|CLONE_NEWIPC|CLONE_NEWUSER|CLONE_NEWPID|CLONE_NEWNET|SIGCHLD) failed. You probably need root privileges if your system doesn't support CLONE_NEWUSER. Alternatively, you might want to recompile your kernel with support for namespaces or check the current value of the kernel.unprivileged_userns_clone sysctl: Operation not permitted
[E][2019-12-28T11:13:47+0000][15] int nsjail::standaloneMode(nsjconf_t*)():146 Couldn't launch the child process
Hey, someone is me haha
I scrolled up to look and couldn't find it ;-; sorries probably was
Np haha
maybe --cap-add SYS_ADMIN would be sufficient, but usually apparmor will also complain
Where can i get melons
what? melons?
In a.. Melon store?
I'm having some trouble getting the site repo set up and running in a local dev environment. Here's the current error I'm trying to solve when attempting to run the server or just tests:
django.db.utils.OperationalError: fe_sendauth: no password supplied
Some additional details:
- I've gone through the instructions at https://github.com/python-discord/site/blob/master/docs/setup.md, with the exception of the
pip install -e .[lint,test]step, which does not run because there's nosetup.pyfile. Looks to me like that section is out of date. - I'm using PyCharm, with a pipenv, and with the packages automatically installed from the Pipfile that came with the repo. I believe that negates the need for #1.
- I'm not using Docker at the moment.
- I've tried with both Windows 10 and Ubuntu 18.04 and have the same error on each.
The docs on the site are mostly out of date. Have you read the contributing wiki on our site?
Since you don't want to use Docker, the only thing the wiki lacks is a guide on how to setup postgres. However, the docs in the repo should still be relevant for postgres.
Oh, wow. I didn't realize there was another source of info.
I'll take a look, thanks.
We should remove the other one and just point to a single source
So to be clear, the instructions at https://github.com/python-discord/site/blob/master/docs/setup.md are basically deprecated?
Cuz that link came straight from the README.md file on the GitHub repo homepage.
It should at least be updated, yes.
It's an oversight.
We've since changed the set-up, but forgot to update this part
Yeah those don't seem to work with the current state of the code, maybe. I've spent a whole buncha hours under the assumption that the problem was me, and I didn't want to ask for help because I think "so how do I run this thing" is not a very confidence-inspiring introduction, hahaha
haha it's all good, I'm definitely not upset about it. Keeping documentation up to date is not trivial, I totally get that.
The good news is I learned some stuff along the way too π Anyway - I'm gonna go do something else for a while and come back to this later on, thanks for your help!
Hey
Hi
@lapis hull do you wanna use windows to run the site and the bot?
@green oriole most likely, thats my general purpose machine. I do have a Ubuntu VM I use when windows poses problems. Why?
I used Windows to run the bot during Hacktoberfest to make some small contributions, FWIW
Because we have a temporary guide pinned here especially for win 10 setups ^^
Oh, nice. I'll check it out when I get back to it, thanks!
Hey @tawdry vapor, I'm working on some bot-side snekbox improvements, could it be useful to perform a health test every 5 minutes, and restart the snekbox container if it failed?
How do you pycharmians quickly restart the running bot? Since pipenv run start makes me use the terminal to run it, and forcing a break there seems to take quite a few seconds (windows).
Use CTRL + PAUSE to force stop it
Laptop, don't have a pause key. If I run in a normal terminal, I can use ctrl+fn+b to stop instantly, but in pycharm for some reason it's really slow
Guess I'll just run in an external terminal then?
@past falcon use a run configuration
running the bot in pycharm interpreter is not da wey
you set up a run config for it and then pycharm just gives you a restart button
ah, but, can u show me da wey? I tried a run config but was hitting all kinds of import errors x_x
that means your pycharm interpreter for this project isn't set to the pipenv environment
so basically go into your config and use the search bar to find project interpreter
and if pycharm can't autodetect the pipenv environment, you'll need to manually add it by just navigating to the correct python executable.
I think the interpreter is right, I'm probably doing something other that's silly. I've tried a bunch of combinations for the script path / interpreter options
Script path looks incorrect
If you want to run a module then click the dropdown to the left and select module
Otherwise you need to select an actual .py file
Also, I don't think running this way will load the .env but iirc there's a plugin for it
Cool, yeah now it's complaining about improper tokens instead so I guess that moves the error to the .env
Hm, but "running this way" makes it sound like there's a way that does not require extra plugins?
@green oriole perhaps, but how do you plan to do that through the bot?
I imagine it could be done with Docker health checks and some devopsy stuff
I mean I usually run things with docker where possible
but yeah, you can add env vars to your run config there
but you should be able to use the Env File plugin
just remember to select the env file in the tab in your run config
I'm starting to get the docker appeal
This feels like the third time I ask something like "how do I..." and someone answers "idk, I just use docker" π
Cheers
@tawdry vapor well, with the latest breach, the container was still running, but the memory was full and no eval could run. I think we can simply send print('healcheck ok') to eval, and test if it return healcheck ok
If it doesn't, it send an alert and reboot the container
How exactly will you reboot it though
I don't really know how the web server exactly works, I think we could simply launch a command to ask docker-compose to reboot the container
Anyway, lemon rebooted it last time, we could just ask him how he did it
I guess ideally you'd just reapply the state
titles show twice on my phone (I can't check on my desktop, but the alternative User Agent still shows them)
is that on purpose?
a) I don't think snekbox needs to be that resilient just because someone broke it one time
b) if we were gonna implement that kind of resilience, it shouldn't be handled by the bot.
@green oriole @tawdry vapor
whoops sorry
@long garnet the top title is probably a breadcrumb
it is
I think we hid them but maybe not for mobile?
I thought we did
<nav class="breadcrumb is-pulled-left" aria-label="breadcrumbs"> <ul>
<li class="is-active"> <a href="//pythondiscord.com/pages/">Code Jams</a> </li> </ul> </nav>```
I don't know if that pasted well
but yes
make an issue then, sounds like a bug.
okies
Didn't we just hide the top level of the breadcrumbs?
Oh right, yeah
anyone to take a look at https://github.com/python-discord/bot/pull/701? Got around to #533 and don't want to create additional conflicts or combine some things as they seem to be going around the same thing a bit
I know I can request a specific reviewer with that GitHub tool but I don't know if that's polite or not
Well, you can also left a comment mentioning the person
I mean, that puts them on the spot
If they want to ignore it then they can
@long garnet It's fine to ask someone to review your PR. They'll tell you if they don't have time at the moment.
in a new comment?
You can do it here as well, by mentioning them.
There's probably a reason why you want to ask a specific individual (my guess is that it relates to something they originally wrote), so contacting them should be fine.
do you have the time to review it?
I think I could ask Scragly, too, but he's been very busy
I think I'm going to put some time aside to review PRs this friday. Tomorrow (new year's eve here) and Wednesday I've got a lot of social obligations and Thursday I'm afk whole day for work.
So, if you request a review, I'll try to look at it Friday
No worries! I've been a bit busy lately and I should spend more time reviewing
Since I'm house sitting this week I'm going to try to get my review on
@green oriole Thanks for that pinned guide, that was helpful! There is a tiny broken link if you care, not super important. Also might be worth pointing out that I did have to manually set DEBUG=1 in the .env file for tests to run successfully (wasn't doing the ALLOWED_PATHS stuff in settings.py without it), but it's also possible I wasn't running tests correctly or something.
Hi @lapis hull, noice! Is the broken link redirecting to http://wip.com/? This one is kind of intentional, because the guide should be hosted on https://pythondiscord.com/, so in the final version, it will redirect to another page on the pydis site itself. Thanks you for the debug env var, I'm gonna add it ^^
@green oriole oh, I gotcha. Yeah that makes sense. The one pointing to http://soon.tm right? I thought it'd be linking to a different section on the same page and could just be a relative link. But if it'll be a separate document I see what you mean.
Oh yeah soon.tm I remember now :D
Made me chuckle, lol
^^
I've added the debug env var
The guide should be ready to go!
If someone here can upload it to the site before 2020, that would be awesome!
Well, too late :D
I'll work on it now
Nice @tawdry vapor, maybe you can do it before everyone is in 2020, haha. You should be able to copy paste the raw text of both files, but there is a placeholder link (https://soon.tm/) at the beginning of the bot that should be changed to the site non-docker guide ^^
It's going to be integrated into the existing page instead of being separate
Oh okay
Hmm, the static root is a Linux path
So it is not going to work on windows, right ?
The only difference is the path separator
Was sort of hoping it wouldn't be an issue but I didn't test
the ./ may be redundant anyway
Okay, it is getting late now, but i can probably test it tomorrow
Also, I feel like the section about launching the site is quite misleading, I had to read it twice to actually understand it, and I had background on the launch methods
Misleading?
I don't think that's the right word either
Disturbing means you felt unsettled or uncomfortable
_I should really go to bed :) _
I mean
I don't really know how it works
There is informations everywhere, and no link between them
I'd appreciate more specific examples but you can get back to me tomorrow
Okay, gonna write you a quick thingy before I go (using very basic words lol) :
I the Run the project section, there is the two subsection chained one to another, but the user should only follow one of them, right? But there is no note about it, so I think it would be nice to have a little text before the two subsections explaining which one to follow. Also, there is two different instruction in the subsection Run on the host, which aren't clearly delimited and it is not explained which method to use ^^
Happy new year Mark, and see you tomorrow ^^
Well in case someone has a look, it's not completely done yet but it's getting close. So that may explain some things you may find missing.
I may end up restructuring the bot guide anyway, I don't know yet
Was just trying to get it out there for now
lol, I opened a ticket back in May on the django-sass-processor repo regarding it being incompatible with django-simple-bulma
I just got a response to it now
"I have no idea why this is happening, and I'm closing this ticket because there isn't enough information"
so I guess we're on our own
yeah, just closed it
That's..... unprofessional
I mean is there anything stopping you from reopening it with more information? It's not like it's locked right
Nah, I am gonna ask him what info he needs
but tbh it's very, very simple to reproduce
I dunno what else I can give him
I'm having problems while trying to install the dependencies for seasonalbot. I'm getting an error when I run pipenv sync --dev. It seems to create the environment but when installing i get the error the ssl module in Python is not available and then ERROR: ERROR: Package installation failed.... here is the full result https://paste.pythondiscord.com/wuzokecijo.py.
I prefer using VS Code on my computer that PyCharm because i have used it more and it is faster but now I'm not sure if It'll just make things harder and more complicated. I would appreciate some advice
Win 10
And how did you install python?
I created the virtualenv using a conda environment
Ok. It won't work with 3.8 will it, only 3.7
3.7 yeah
Whatever is in the Pipfile
Thanks. Ill try that
Yay it all works! Now to work out how it works...
Can someone try to do .bm https://discordapp.com/channels/267624335836053506/291284109232308226/663784996703698960? It doesnβt work for me
same
doesn't work
I think OT is now blocked
its a issue with message itself
maybe it exceed highest no. of character
can we see logs for that ? anyone
I think i got it
as the message DMed contain the element of the message combine that with other things such as hint , it exceed the character limit @green oriole
I'd say that'd be worth making an issue for and fixing
Oh mhh
I will push a PR for that
can you check the logs @mellow hare please, to make sure we got the right problem?
I don't know what logs you're wanting me to check. We don't have a direct hook to seasonal, I don't think
I am pretty sure thats it
Ohh yeah, only @stable mountain is hooked to the site admin
Well make sure you test it before you PR it
No, I'm saying your fix
I mean yes but testing to make sure your change actually worked isn't linting
It's just good coding
There is actually a log file hosted on the server, but I donβt think it is worth bothering
Ok
I don't know why you keep bringing up the number of comments on the PR as if it's abnormal. It's not.
And honestly it should be seen as a boon rather than a burden. The opportunity to learn from mistakes is key to becoming better
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: HTT PException: 400 BAD REQUEST (error code: 50035): Invalid Form Body
In embed.description: Must be 2048 or fewer in length.
yeah
that's the issue
Well, you can just add ... and trucate the message if it is too long
tbh, you should reduce it to less than 2048 chars, having that much of information isnβt very useful
and take some space when you browse through your bm
It maximum should be 256 ;-;
256 doesnβt seems like a lot though π
though*
You should test some value and use the best for you
I just thought βno t at the endβ while writing it lol
Should i open a issue ?
It's obliviously need to be fixed tho
also i heard there are new template.
Yep
Apply the tag?
labels
Just go ahead and fix it π
this tag is about new features and things like that
He said you can fix it
oK
@green oriole there ?
More or less
just wanna see if the code edit i did is enough ?
like it does what it supposed to be doing
what do you mean by LGTM and stale
damn, I thought it meant Let's Get This Moving
Hello @deft fog
...
Hello folks, back for more help. I've got the site running locally. Currently writing tests for the "reminders" API endpoint. I have a handful of successful tests (just those looking for 401 & 404 responses). That's the background.
I'm getting nothing but 400-code responses when trying to create a valid instance of a reminder during the test setUp(). I've tried a range of things trying to see how I'm malforming the reminder POST body, with no luck. And something that seems odd - when I go to admin.pythondiscord.local:8000, I do not see a section for Reminders under the API section.
That might be a red herring though, because in pgAdmin I do see an api_reminder table in the pysite DB.
I guess here's the simplest version of the code that I've tried that's giving issues. And beyond this simple example, I've tried a bunch of other ways to format self.data, including specifying all the fields of the Reminder model, and providing a datetime.now() object for the expiration.
class ReminderCreationTests(APISubdomainTestCase):
def setUp(self):
super().setUp()
self.author = User.objects.create(
id=1234,
name='Mermaid Man',
discriminator=1234,
avatar_hash=None,
)
self.data = {
'author': self.author.id,
'content': 'Remember to...wait what was it again?',
'expiration': datetime.utcnow().isoformat(),
}
url = reverse('bot:reminder-list', host='api')
response = self.client.post(url, data=self.data)
self.assertEqual(response.status_code, 201)
def test_reminder_in_full_list(self):
self.assertTrue(True)
I think so. The code I supplied uses the example for expiration given in the ReminderViewSet definition I believe. I also tried just passing regular datetime.datetime objects. I'm not in front of it now, but for tomorrow, do you know if the response object has any other fields that'd help discover why it's being rejected?
I'm not sure. Try to attach a debugger and step through the code in the code in the viewset
If there is an error with a specific field the error message will specify the erroneous field
Ooo I've never done that, good idea. Should be able to try it tomorrow, thanks!
wonder if someone approves my PR . alredy have 1 approval . seasonalbot
i want it to pass cuz its a bug.
You have the link?
I can check it real quick
Okay, just need for a core dev to press the merge button :)
The bot's output seems to be ending up with stderr in front of stdout instead of intermixing them now?
!e ```py
import time
print(1)
time.sleep(0.5)
raise ValueError("test")
@sharp timber :x: Your eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 4, in <module>
003 | ValueError: test
004 | 1
Previously this does not seem to have been the case: https://discordapp.com/channels/267624335836053506/587375753306570782/643566838608822293
Hmm
Interesting
Lemme see
apparently github doesn't want to load the file history
At least the bug was introduced before December 26th https://discordapp.com/channels/267624335836053506/267659945086812160/659745217733328907
Only 3 commits in this range
None are really related to the formatting
Maybe it is the fault of the snekbox container
Which.. Would make sense
Yes, that's the place where this probably happens
The bot just displays the info it gets from the API and I don't think it gets the output separated by stdout/stderr
I would bet money it has to do with the transition from ash to bash
Probably, that's the only thing that changed
The nsjail.py file wasn't updated in this range
Pycharm actually has a similar issue
IIRC the reason given was because the stderr/stdout streams are handled differently, and because of how pycharm does it's locking internally it's only line-atomic, not print-atomic like you'd expect a terminal to be
NsJail apparently doesn't even make a difference between stdout and stderr
I've found references to bash doing this in other situations
Seems logic, the OS buffer stdout to avoid doing too much file write
So, just a matter of adding the command to the dockerfile?
I'm not sure
I do technically have a working dev environment, let me spin it up and try a few things
docker was updated, but not on my end, weee
Not on your end?
The docker version IIRC was updated in the repo, but my distro does not have the updated docker-compose support
... -.-
It wasn't updated, so what exactly is wrong on my system
K, I ran the build commands wrong and the error message was extremely misleading
Because error messages should be meaningful?._.
"Error: Version in ./docker-compose.yaml is not supported"
Reality: the image was never build with pipenv
Haha
nope, still doing it
I guess it is about the image version maybe
ffffs
Last time I tried to build it, I had to build three images
docker-compose is behaving very badly on my system, but devsh works now so shrug
on my machine, via nsjpy, with (supposedly) up to date snekbox it works
Which makes sense, since nsjpy doesn't actually run the subprocess code
So I can run the dev stuff, but not the box itself, which si strange
pipenv run devsh is a-ok, but docker-compose up breaks
There we go
yeah, my version of docker-compose was way out of date
Got postman and /eval triggering each other, so here goes..
There, now that code's running here goes..
Passing -u to python reverts back to the old behavior
might as well write up a bug report
@tawdry vapor Putting it through a debugger and checking data at breakpoints was a great suggestion, both because it allowed me to find the problem, and because it gave me a good opportunity to start learning debuggers. Thanks!
You're welcome glad you solved it
https://discordapp.com/channels/267624335836053506/454941769734422538/664925598702895145 what failed here today? I kinda understand what the error means but not in relation with my message
oh nvm, is it because I added text in the same message?
oh ye that's what it is
@hard solar
the staging bot is back?
yeah it's brilliant
Sorry, but you may only use this command within #bot-commands.
Sorry, but you may only use this command within #bot-commands.
^ @hard solar shouldnβt be limited to a specific channel?
oh
Yeah I'll switch it to the other server now
but I needed a large guild for testing
@molten bough have you used prometheus yourself?
I haven't, no
I just run a gitlab and I noticed it can deploy an entire prometheus cluster to k8s automatically for some reason
That's where I first heard of it
ah okay
any idea for other useful metrics apart from users online by status & messages by channel?
I'm a person that enjoys statistics in general
when working on a little Discord bot for logging stuff to influxdb I was trying to do stuff like list the most popular spotify songs and things like that
but honestly outside of activity metrics, I can't think of much useful stuff
hmm
well, guild members and guild messages are also the only two things i track on my own bot
maybe we'll think of something else
Yeah, handy to have the option in future anyway
mhm
i've never used irc :(
it looks like this http://sbnc.khobbits.co.uk/log/stats/computercraft.htm
it's mostly just for fun and some of it feels mean now, but it was nice at the time
Yeah, I see the resemblance
there's similar metrics there - but they also track by-user and i think that's super creepy
(they even store typing events)
I can understand storing some by-user stuff, but yeah, typing is.. a bit much
and of course something like pisg actually keeps message content, which is probably no good here too
haha
Hi @nocturne hare, do you need any help to setup the pydis site on your machine? I had some problems too (mainly due to windows), if I can be useful in any sort
I had some issues with it complaining about invalid Form data
but didn't look into it
I closed it all down :P
I'll keep you in mind if I get it again
I just had a moment of anger when I couldn't do !rules 6 pls no advertisement
so i fixed it
Haha
5. Do not provide or request help on projects that may break laws, breach terms of services, be considered malicious/inappropriate or be for graded coursework/exams.
huh works here
The fix was merged a half hour ago
ahh thank you
hmm still getting the same error
bot_1 | Jan 12 17:25:03 Bot: | bot.cogs.error_handler | ERROR | Error executing command invoked by f1re#3996: !rule 6
web_1 | "POST /logs HTTP/1.1" 201 220
bot_1 | Jan 12 17:26:14 Bot: | bot.cogs.alias | DEBUG | site rules was invoked through an alias
bot_1 | Jan 12 17:26:14 Bot: | bot.pagination | TRACE | Added line to paginator: '**5.** Do not provide or request help on projects that may break laws, breach terms of services, be considered malicious/inappropriate or be for graded coursework/exams.'
bot_1 | Jan 12 17:26:14 Bot: | bot.pagination | DEBUG | Paginator created with 1 pages
bot_1 | Jan 12 17:26:14 Bot: | bot.pagination | DEBUG | There's less than two pages, so we won't paginate - sending single page on its own
web_1 | "GET /rules?link_format=md HTTP/1.1" 200 748
web_1 | "POST /logs HTTP/1.1" 201 189
web_1 | "POST /logs HTTP/1.1" 201 238
web_1 | "POST /logs HTTP/1.1" 201 186
bot_1 | Jan 12 17:26:14 Bot: | bot.cogs.error_handler | ERROR | Error executing command invoked by f1re#3996: !rule 5
I don't know. It works for me and it works in production.
What's wrong with the docs command?
Tried getting django and discord.py docs, neither finds anything
But the inventories are there
Do they need a forced refresh?
Is that even possible?
Sorry, an unexpected error occurred. Please let us know!
AttributeError: ('intersphinx inventory %r not fetchable due to %s: %s', 'https://docs.python.org/3/objects.inv', <class 'AttributeError'>, "'DummyObject' object has no attribute 'user_agent'")
can't say that I know what the above means
I have no idea either
I don't think it's part of something you wrote and it's recent
I wonder what changed.
There were a few changes in the last couple of days, I'll try to pinpoint it to a change
Maybe a dependency has changed
Ah, we recently merged a doc PR. I'll try to play around with that
That's an interesting error
I've managed to replicate locally and I've got the full traceback
I'm making an issue first and maybe I'll try to do some probing later
unexpctedly got a bunch of free time so can look into it more, was working fine on my local branch for the latest doc fix I did but getting that thing above after syncing with upstream
Yes
I'm looking at the lockfile now and we've seemed to have moved up a version of sphinx in the latest merge
The requests version has stayed the same, so that version upgrade could be the cause of it
hm
I need to solve another issue first.
@last patio Do you know if I have to do some manual clean-up after stopping the bot and before restarting it again? I'm now unable to start the bot because of
Traceback (most recent call last):
File "/usr/local/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/local/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/sebastiaan/pydis/repositories/djangobot/bot/__main__.py", line 61, in <module>
bot.run(BotConfig.token)
File "/home/sebastiaan/.local/share/virtualenvs/djangobot-Py5o4YeS/lib/python3.7/site-packages/discord/client.py", line 598, in run
return future.result()
File "/home/sebastiaan/.local/share/virtualenvs/djangobot-Py5o4YeS/lib/python3.7/site-packages/discord/client.py", line 579, in runner
await self.start(*args, **kwargs)
File "/home/sebastiaan/pydis/repositories/djangobot/bot/bot.py", line 54, in start
await start_prometheus_http_server(addr="0.0.0.0", port=9330)
File "/home/sebastiaan/.local/share/virtualenvs/djangobot-Py5o4YeS/lib/python3.7/site-packages/prometheus_async/aio/web.py", line 111, in start_http_server
await site.start()
File "/home/sebastiaan/.local/share/virtualenvs/djangobot-Py5o4YeS/lib/python3.7/site-packages/aiohttp/web_runner.py", line 102, in start
reuse_port=self._reuse_port)
File "/usr/local/lib/python3.7/asyncio/base_events.py", line 1374, in create_server
% (sa, err.strerror.lower())) from None
OSError: [Errno 98] error while attempting to bind on address ('0.0.0.0', 9330): address already in use
works fine for me with a pycharm run configuration that runs the module
I can't start the bot and I'm still trying to figure out how to stop this server
Okay, it was some Python process lingering around after the bot process had exited
Hmm, it doesn't happen to me now either. It happened the first time, but it does not happen again now
I can't reproduce it now
For some reason, I can't find anything in the docs of the standard lib. It may be a local problem, but I don't know what could cause it.
I'll put together a fix that will also hopefully make it clearer for the future, what useragent should it use?
I currently have this:
class SphinxConfiguration:
"""Dummy configuration for use with intersphinx."""
config = DummyObject()
config.intersphinx_timeout = 3
config.tls_verify = True
config.user_agent = "Python Discord/1.0 (https://pythondiscord.com/)"
Used the one I found in the reddit cog, might be worth making it a const and pass everywhere
The docs command is currently non-functional, but there's a fix that needs one additional review: https://github.com/python-discord/bot/pull/728
If anyone with write-permissions has some time to review this small PR, it would be greatly appreciated
I think you have write permission, right? You're in the Contributors team on GitHub, are you not, @green oriole?
I am, but I can't merge the PR
Master is protected
Even if there is two approvals
Yes, but your reviews count towards the total number of reviews required (and you can make branches)
Yep
Right, that means you do have write access (officialy, it's only triage permissions that are needed for that, but our contrib team has write access so they can create branches directly on the repo).
Okay nice
str.partition(sep)```
Split the string at the first occurrence of *sep*, and return a 3-tuple containing the part before the separator, the separator itself, and the part after the separator. If the separator is not found, return a 3-tuple containing the string itself, followed by two empty strings.
I feel like this server icon is missing some interpolation frames, doesn't it?
Smooth here too
Well, it is is smooth on my iPad too, probably just the android desktop working as expected
Maybe your monitor has a weird refresh rate
Monitor? It is on my phone :P
Hmm, apparently you did disabled check_suite on the bot gh hook, but not on the site
@hardy gorge hm, I think the reuse flag should be set there - but if you find a way to reproduce it, I know a way to set it ourselves
Strangly enough, it only happened during the very first time I ran the bot with that commit
I've got a branch that I believe is ready for PR / review. I've never done that from within the official repo, however, and I'd like to make sure I do it correctly. All my changes are currently local - do I first push my new branch up to the repo and then initiate the PR?
Yes
Yep
Y'all are quick π
I have my moments
i'm a bit confused with https://github.com/python-discord/site/pull/303
Hi, this PR show the attachments along with the original message in staff logs (https://staff.pythondiscord.com/bot/logs/...). python-discord/bot#630 need to be merged after this one for the featur...
doesn't django require migration IDs to be unique
like, the numeric part
Does the CI apply migrations?
It doesn't seem to matter as long as the dependencies are correct
I'm pretty sure it does, otherwise we would have some persistence there
yeah, seems right
@tawdry vapor Do you still have a repository for your Code Jam 3 submission up somewhere?
hm
It's a pygame-on-osx thing
@last patio you can fix it by changing the pygame version to 2.0.0.dev6
thanks, Iβll try that tomorrow!
!user seems to be broken, although I'm not sure why. I think it has something to do with the address of the Docker container it looks for, which I know little about
I don't know if that's really the case
what I have is bot_1 | aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host api.web:8000 ssl:None [Connect call failed ('172.18.0.3', 8000)]
there's no .0.3 if I do grep 172 <(ip -c addr)
!user
Sorry, an unexpected error occurred. Please let us know!
TypeError: expected string or bytes-like object
Works for me when I run my own instances
well, the log on the site is useless
Error executing command invoked by manusaurio#5249: !user
!user
User Information
Created: 4 years, 1 day and 15 hours ago
Profile: @tawdry vapor
ID: 137073073168973824
Member Information
Joined: 1 year, 6 months and 4 days ago
Roles: <@&352427296948486144>, <@&295488872404484098>, <@&587606783669829632>, <@&430492892331769857>, <@&267630620367257601>, <@&490216785547755530>
Infractions
Total: 0
Active: 0
π€
I'm not worthy?
@last patio if you're around could you fetch the traceback for the earlier fail?
!pep 249
well, I have no idea why it's not responding to me, it's the same in my own server
if someone wants to invite me to their test server to use the command I'll do it
!user 427194066216681474
Sorry, an unexpected error occurred. Please let us know!
TypeError: expected string or bytes-like object
Right
I'm not the only one then
you mean the logs from docker logs, right?
That was on your profile. There's something in there that it doesn't like.
It's an issue we've seen before, I think. Is there not an issue for it?
should this be in bot or site?
This is a bot issue
I don't think I've seen it then
You have a custom status, right?
I have the hearts and the playing Emacs
!user
!user
Sorry, an unexpected error occurred. Please let us know!
TypeError: expected string or bytes-like object
User Information
Created: 4 years, 22 days and 5 hours ago
Profile: @woeful thorn
ID: 129606635545952258
Status: Locking...
Member Information
Joined: 1 year, 5 months and 14 days ago
Roles: <@&463658397560995840>, <@&352427296948486144>, <@&295488872404484098>, <@&587606783669829632>, <@&505040943800516611>, <@&585529568383860737>, <@&267630620367257601>, <@&542313670223331329>, <@&490216785547755530>, <@&267629731250176001>, <@&267628507062992896>
Infractions
Total: 4
Active: 0
!user
I also have a custom emoji
!user
Sorry, an unexpected error occurred. Please let us know!
TypeError: expected string or bytes-like object
!user
!user
Sorry, an unexpected error occurred. Please let us know!
TypeError: expected string or bytes-like object
!user
it's when I have emoji and no text it seems
User Information
Created: 2 years, 5 months and 28 days ago
Profile: @hardy gorge
ID: 336843820513755157
Status: text
Member Information
Joined: 1 year, 11 months and 3 days ago
Roles: <@&463658397560995840>, <@&352427296948486144>, <@&295488872404484098>, <@&587606783669829632>, <@&267630620367257601>, <@&490216785547755530>, <@&277914926603829249>, <@&270988689419665409>, <@&267629731250176001>, <@&267628507062992896>, <@&267627879762755584>
Infractions
Total: 7
Active: 0
tada
Cool, so it doesn't account for an emoji-only custom status
!user
Sorry, but you may only use this command within #bot-commands.
is this the issue you thought of, @hardy gorge? https://github.com/python-discord/bot/issues/654
CustomActivity (and its .emoji attribute) are new in d.py 1.3.0
it wouldn't be hard to simply check if the status text is empty for now, though
@long garnet there are some conflicts in your PR https://github.com/python-discord/bot/pull/701 can you resolve it? After you do I'll approve and merge it, it looks good to me
alright
great
thanks
@mellow hare donβt know if you noticed it inside the conversation, but here it is https://github.com/python-discord/bot/issues/676 I got a little carried away by the holidays and the jam, but Iβll finish it soon(ish) for sure ^^
that'd be really useful
Especially for magnificent mess ups like I had earlier
Hey guys
Recently in a issue on github, scragly made a comment
For posts that are videos, we could use the page og:image meta tag, as it contains an image preview.
can explain me what is that og:image
okay
will the tag be only for posts in which a video has been posted?
i see og:url but no og:image
okay
Poetry? 
am i supposed to have access to this channel?
oh. for some reason, I thought it was contributors-only
