#dev-contrib
1 messages Β· Page 96 of 1
Pipenv should be able to automatically pick up the version if you have it installed on your machine
If not, and you're on linux, look into pyenv to manage your system installs
But you'll have to get 3.8 regardless
I don't have 3.8 installed. I'll get it and try again.
Huh
it was erroring out of the yarnpkg keyring so i thought we could remove it, if it causes some issues we could always add it
Wait... Why is Sudo being used if logged in as root
won't matter.
Removing dev keys can make you not be able to add it back
ah ok, would reinstalling that pkg make it work then?
Usually you should just pull a new key, yes
and a revocation certificate if it has been released
ok
Yay, pipenv sync --dev finally worked. Thanks Akarys and Scaleios!
naice
This is what I need in my hosts file, right?
looks good
If youβre running everything on docker and donβt need to access the site, then yeah
Otherwise you still need to do it
Got it, ty!
I have another semi related issue. I'm on Windows, and I'm trying to uninstall and reinstall docker desktop, but when I click uninstall it takes me to the "Uninstall or change a program" page. But there, there's nothing related to docker.
I can still open Docker Desktop.
does docker let you run more bots and use less memory?
Didn't find anything there, now time to search my whole pc.
Docker is just here for isolation, it doesn't allow you to do more things
I kinda want to install it anyway.
fuck, the env on notion is using fake redis
ahhh, that'll be it
Yeah, I'd still advise you to use it
Alright, let me check that it works
π
Yeah I will, my docker is screwed up since I installed it a while ago. I'm just having problems finding the uninstall so that I can reinstall after.
why?
I think there is a log entry, it just gets lost in the flood of startup logs
Ideally your code shouldn't break just because someone is using fake redis lmao
Because it shouldn't be ever enabled in prod and it is easier to notice the issue when testing
it doesn't break, it just doesn't work as a persistent cache
yeah, there is no persistence
"docker uninstall" returned nothing. Time to search for "docker desktop uninstall".
Yea, agreed, it just raised a possible false negative on this PR
You say that like Hem can't sense what everyone is thinking all the time
So apparently, there's no uninstall file on my desktop for docker. But anyway, when I run docker-compose up, I get this:
[19952] Failed to execute script docker-compose```
is docker running
For https://github.com/python-discord/sir-lancebot/pull/659, even if allow_dms is True, it doesn't seem to return True in any case. Shouldn't it always return True if allow_dms is True?
I have the desktop app open.
Is there something else I need to do?
The app says "No Containers Running"
are you running it from the project root dir?
IE the same dir as the docker-compose.yml file
Yes.
Odd, I only tend to get that error when docker agent isn't running
(That part of the code doesn't get called for DMs, we discussed it internally now)
then why is it a parameter?
Does docker --version output anything?
Docker isn't recognized. Dang it.
restart your terminal
It shouldn't be a thing, but that's why we have reviews, so not everyone has to know everything all the time
Still nothing.
can you check path
Yea, it'll be something like C:\Program Files\Docker\Docker\resources\bin
just type PATH in cmd
terminal restart?
I closed and opened it a couple times.
Yeah, same thing.
C:\Program Files\Docker\Docker\resources\bin
hm
I think default install is
C:\ProgramData\DockerDesktop\version-bin
check your files
docker.exe is in that folder.
Which folder?
version-bin
Alright, try adding that as well
That worked. Thanks!
nice
I now have this:
web_1 | System check identified no issues (0 silenced).
web_1 | April 06, 2021 - 16:03:38
web_1 | Django version 3.0.11, using settings 'pydis_site.settings'
web_1 | Starting development server at http://0.0.0.0:8000/
web_1 | Quit the server with CONTROL-C.
```, but going to that url does nothing.
Both say "This site can't be reached"
uhh
can you check the response in the network tab
Oh wait
without the s
and with the port lol
I'm so bad at this
The bottom one worked. Thank you so much!
Currently when we request on https://quackstack.pythondiscord.com/duck, it just show the file location, instead we could even render the ducky in a nice way. A possible way can be something like the 404 error page on pythondiscord.com (https://pythondiscord.com/.env)
cc: @fervent sage
hm, quackstack - or at least the current parts of it that make up the api - is meant to be a backend microservice, so it doesn't really make sense for it to do frontend stuff (especially since the request also takes json params the browser doesn't give), so i think that should wait for whatever frontend gets stuck onto quackstack
When you're contributing to the site, how do you access the admin dashboard? Is there a test username and password, or can we just not access that?
admin - admin
Oh, well that's simple. Thanks!
Oh ok.
Eventually, yes.
I'm having some issues with Django url paths.
I have this code:html <a class="navbar-item" href="{% url 'wiki:get' path="timeline/" %}"> Timeline </a>My issue is that the timeline is not in the wiki folder, so I don't know what to put in the wiki:get section.
@patent pivot how do we unstuck the lint check on https://github.com/python-discord/quackstack/pull/27?
i notice the ci merge went through
could push a blank commit and squash it
branch updated
cc @short snow: I updated your fork to fix a stuck lint
there we go
man ducks in prod soonβ’οΈ
there we go
lol why is policy bot not reporting ow
{"level":"info","rid":"c1m9pgoeg3cfm7m6infg","github_installation_id":13368055,"github_repository_owner":"python-discord","github_repository_name":"quackstack","github_pr_num":25,"github_sha":"ef2f78fd9018162836870f2fb64cf9e6913987ce","time":"2021-04-06T17:39:18.225350775Z","message":"Skipping status update because PR state is not open"}
mfw
oh
lol
worked ig
(Heya can someone take a look at/assign https://github.com/python-discord/bot/issues/1505 when y'all get a chance?)
our very first production man duck: https://quackstack.pythondiscord.com/static/91d4412cad7492a91f92ad722bbda20dd80e7ecb.png
Lmao
Suggestion: add a flag like --timeit to the !e command
which would, well, show how much time it took to execute the code along with the rest of the output
oh
(I love that PR number)
heh
i'll admit im very satisfied to have bot#1500
was my first merge to main too π
We get those updates directly from discord, but those donβt seem to actually change the OAuth screen at all
My guess is that it might change the OAuth screen in the future once they finish up that feature, probably doing some final testing or something before doing so
does snekbox automatically update?
it auto-deploys, yep
i mean, the python version
ah, no
@patent pivot sorry for the ping, but i'm setting up the site, i ran docker-compose up and it was going for some time, then it stopped on Installing dependencies from Pipfile.lock (804ba7)... or i think my session may have timed out, should i just re-run the command?
that might take some time
what's quackstack?
Duck generator as a microservice
It's currently deployed at https://quackstack.pythondiscord.com/ but there aren't many docs
that page has a set of issues
I think that is somewhat blocking on having more things available, such as a CLI and PyPI package
for the time being if you wants docs i am walking talking ducks docs
and here we see @magic arch playing with his rubber duckies...
Could sir-lancebot get a draft PR emoji so it can show draft instead of the green open emoji?
For example, sir-lancebot#623
Where are the emojis the bot is using actually at?
another server i think
smol pr needs review
What are the current review requirements for a pr to be merged?
Clicking Details gives you a good view of it: https://i.imgur.com/K7ZW0bF.png
So for example for the PR above, https://policy-bot.pythondiscord.com/details/python-discord/sir-lancebot/657
2 staff/contributor approvals a coredev approval and no disaprovals from a staff/contributor I think
+ anyone in the pydis org can disapprove + a devops review is required if GitHub Actions or Dockerfiles are changed
yeah, that
Aha found the actual policy file that determines it all for reference, it has comments and everything: https://github.com/python-discord/.github/blob/main/review-policies/core-developers.yml
I can do a PR, we need an emoji though lol
can anyone voice call with me
oh wait
it says to use pipenv sync --dev
but when i do i get: ModuleNotFoundError: No module named 'distutils.spawn'
lmfao
@vale ibex maybe we should merge the other PR for now so it's a very temp fix, then merge yours eventually...?
yea sure, good with me
only issue with the small PR is it doesn't handle any raised exceptions
but it's unlikely to happen with the use case for that specific cog
yes
$ docker-compose up
bot_1 | raise ClientConnectorError(req.connection_key, exc) from exc
bot_1 | aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host pydis-api.default.svc.cluster.local:80 ssl:default [None]
bot_1 | 2021-04-06 21:17:54 | bot | CRITICAL | Could not connect to site API. Is it running?
bot_bot_1 exited with code 69
what am i doing wrong?
in config.yml
under urls
set these vars ```yml
site: &DOMAIN "web:8000"
site_api: &API !JOIN ["api.", *DOMAIN]
site_paste: &PASTE !JOIN ["paste.", "pythondiscord.com"]
site_staff: &STAFF !JOIN ["staff.", *DOMAIN]
site_schema: &SCHEMA "http://"
some might already be correct
ctrl + c
2021-04-06 21:37:46 | bot | CRITICAL | Could not connect to site API. Is it running?
did you set this up in config.yml?
yes
web should be saying that it isn't connecting
Did you change config.yml or config-default.yml?
config.yml
ok good
could you do docker-compose down and then docker-compose up --build
Cool, just looks like some of your other config's are setup wrong
looks like it is now right?
The configs are a pain lol
yea, we're working on it
making a whole package for it
if i do pipenv run start it wont connect @vale ibex
you don't need to pipenv run at all
its all running in docker now
Oooh nice, is it open-source yet by chance? I'd love to help out
is the bot online now then?
should be yea
As long as the docker command is running, the bot should be up and running
i'll try !help
It's open source, but we're not accepting non-staff contribs just yet
Ah gotcha, sounds good
Ohhh so that's what smartconfig is lol
Could you show the rest of the error?
hah yea
anything in the docker output?
bot_1 | File "/usr/local/lib/python3.8/site-packages/discord/ext/commands/core.py", line 85, in wrapped
bot_1 | ret = await coro(*args, **kwargs)
bot_1 | File "/bot/bot/decorators.py", line 90, in inner
bot_1 | log.trace(f"Redirecting output of {ctx.author}'s command '{ctx.command.name}' to {redirect_channel.name}")
bot_1 | AttributeError: 'NoneType' object has no attribute 'name'```
ahh that'll be because you haven't setup redirect_channel yet
oh i'll setup all of the cogs now
We're a large, friendly community focused around the Python programming language. Our community is open to those who wish to learn the language, as well as those looking to help others.
thanks :)
np π
Is there an eta by chance on when it'll be ready to go or at least accepting other contribs?
I am not entirely sure lemme look
what is redirect_channel for? i dont see it documented
It redirects some commands outputs if they're not used in bot command channels I believe
okay
So for example when you ran !help, it was trying to redirect the output to the bot command channel, which isn't set up yet in config probably
Yea, it's the constants.Channels.bot_commands channel
hmm doesn't seem we have a public eta just yet
So it's more just be on the lookup for an announcement π
Alrighty sounds good, looking forward to it
It's bot_commands
under the Channels section
I'd suggest going through each of these and updating them to the equivalent on your server ```
style.emojis
guild.categories
guild.channels
guild.roles
guild.webhooks
I also recommend you edit the trashcan emoji
what's big brother?
!help bb
!bigbrother
Can also use: bb
Monitors users by relaying their messages to the Big Brother watch channel.
Subcommands:
!bigbrother oldest [update_cache=True]
Shows Big Brother monitored users ordered by oldest watched.
!bigbrother unwatch <user> <reason>
Stop relaying messages by the given user.
!bigbrother watch <user> <reason>
Relay messages sent by the given user to the #big-brother channel.
!bigbrother watched [oldest_first=False] [update_cache=True]
Shows the users that are currently being monitored by Big Brother.
it give mods the ability to 'watch' users
so all of their messages get relayed to a mod only channel
I saw that it's kinda creepy loll
Thoughts on adding a tag on string indices/slicing?
That would be cool
i cant get the bot to come online now
but no errors in terminal
uhh
the bot isn't starting with the token i put in config.yml
The Sir Lancebot contributing page is inconsistent with the others. It doesn't have the card in the top right. https://pythondiscord.com/pages/contributing/sir-lancebot/
We're a large, friendly community focused around the Python programming language. Our community is open to those who wish to learn the language, as well as those looking to help others.
and now bot_1 | bot.api.ResponseCodeError: Status: 401 Response: {'detail': 'Invalid token.'}
where is it getting the token from?
Also, this page mentions SeasonalBot near the top, which may be confusing to users who are just starting to contribute to PyDis projects (especially since it's linked on the Lancebot contributing page): https://pythondiscord.com/pages/contributing/working-with-git/cli/.
We're a large, friendly community focused around the Python programming language. Our community is open to those who wish to learn the language, as well as those looking to help others.
i put the bot token in config.yml
and .env
@vocal wolf i saw you had this issue, how did you fix it if you mind me asking?
you're trying to setup the bot?
yes
give sec
okay
I think what I did
set up everything in one command
docker-compose up
and
that's all I remember
this is in the config.yml file
can you link me to where I was discussing this issue?
Since you're doing docker you may need to change the site url to web:8000, I'm not completely sure on that though.
i did that already in config.yml
Is Lancebot being slow today, or does it just not like me?
ok thanks!
perfect awesome!
any reason to have no frontend?
thats nice, you could post this on the issue and ask for some feedback, otherwise it is gonna get buried in here
or maybe #dev-branding
there will be a frontend, just not in the backend part
side note, is https://quackstack.pythondiscord.com/duck server erroring for you?
For me it is.

Quackstack's front end will be a customizable ducky builder on the website, right?
think so yea
Noice.
that will be on the site iirc
yeah, itnernal server error
okay
also, should this issue be closed, https://github.com/python-discord/quackstack/issues/3
i've learned more about using git in a more advanced capacity in the last 3 weeks as the entire rest of my time using it 
Welcome to Python Discord development. You're crash coursed through so many useful tools, whether you want to or not
(and by advanced capacity i mean branching
)
Why is this so true...
Let's be honest I had never touched Docker before the bot π€£
Me neither.
I'm curious why this function exists....
the point of that limitation wasn't to try and get around it....
Because it sends webhooks under people's names (like for logging) and some people may use clyde as their name or nickname, causing all webhooks for them to fail.
It's not about circumventing to intentionally impersonate Discord clyde.
relevant pr: https://github.com/python-discord/bot/pull/1009
I thought there was a chance Discord may stop enforcing it but I suppose that went nowhere.
ohhhh
because
hi im clyde is caught as well
not just clyde itself as the only message
danke
related
why write the own manager here and not use praw?
!pypi praw
praw is not async
Cause it didn't exist
oh.
Asyncpraw is new as of this year, server's been relaying reddit posts for at least three
Let me know if you'd like to VC sometime today
I'm not sure what that is. Is that a google VM?
yes
i just had to create a new one and detatch the disk to the new VM to get the files back because i restarted the VM and couldn't SSH
I've never worked with them, so I'm not sure how to help. I don't believe anything uses the ssh port from our projects
are you running for production or development?
development
i....
uh?
no
@short snow No i've set it up again now
Just back to square one
Of the bot telling me my token is invalid
regenerate a token and put it in
The token isn't the problem
It works fine in my own code
And i've regenerated it countless times
the traceback shows 3.6
Did you pipenv install aiohttp?
no i'll try that
because pipenv will be separate from your regular packages
pipenv sync --dev should do that, shouldn't it?
More specifically - your dep install shows 3.6, your running shows 3.8
Yeah, it should work with a sync, I sometimes have to just make sure I actually pipenv install all the packages though
i made a help channel about it, my system wont let me delete python3.6 but i installed python 3.8 i have to type the version number to use it though @gritty wind
try running the following:
pipenv run python -VVVVVVV
Python 3.8.0 (default, Feb 25 2021, 22:10:10)
If that shows 3.8, you should be able to follow up with
pipenv install --dev
Oh cool
If all goes smoothly, you should then be able to start the bot, provided you have the site running
pipenv run start iirc
it says my token is wrong though
I do love pipenv (if you ignore the locking >_>)
you are inside bot, run it from root/discord/bot
Do you mind sharing the error?
yeah just running it
okay so pipenv run start tells me the API isn't running
and docker-compose up tells me my token is wrong
can you share the docker error (provided you wanna continue with docker)
okay
otherwise, docker container ps to see if the site is running
if it is not, see the logs, and post the error here
in that case, try docker-compose up -d postgres web
if you also want snekbox or redis, you can add them to the end of that command
but they are optional
nice
You have to update your config now if you want to run locally. If you are going to run with docker, see what happens now
that wont work because its a cloud VM @short snow
ok i'll try it @gritty wind
docker-compose up?
bot_1 | Traceback (most recent call last):
bot_1 | File "/usr/local/lib/python3.8/runpy.py", line 194, in _run_module_as_main
bot_1 | return _run_code(code, main_globals, None,
bot_1 | File "/usr/local/lib/python3.8/runpy.py", line 87, in _run_code
bot_1 | exec(code, run_globals)
bot_1 | File "/bot/bot/__main__.py", line 15, in <module>
bot_1 | bot.instance.run(constants.Bot.token)
bot_1 | File "/usr/local/lib/python3.8/site-packages/discord/client.py", line 718, in run
bot_1 | return future.result()
bot_1 | File "/usr/local/lib/python3.8/site-packages/discord/client.py", line 697, in runner
bot_1 | await self.start(*args, **kwargs)
bot_1 | File "/usr/local/lib/python3.8/site-packages/discord/client.py", line 660, in start
bot_1 | await self.login(*args, bot=bot)
bot_1 | File "/bot/bot/bot.py", line 256, in login
bot_1 | await self.cache_filter_list_data()
bot_1 | File "/bot/bot/bot.py", line 87, in cache_filter_list_data
bot_1 | full_cache = await self.api_client.get('bot/filter-lists')
bot_1 | File "/bot/bot/api.py", line 80, in get
bot_1 | return await self.request("GET", endpoint, raise_for_status=raise_for_status, **kwargs)
bot_1 | File "/bot/bot/api.py", line 75, in request
bot_1 | await self.maybe_raise_for_status(resp, raise_for_status)
bot_1 | File "/bot/bot/api.py", line 67, in maybe_raise_for_status
bot_1 | raise ResponseCodeError(response=response, response_json=response_json)
bot_1 | bot.api.ResponseCodeError: Status: 401 Response: {'detail': 'Invalid token.'}
bot_bot_1 exited with code 1```
well, I guess check the token, and check that it's loaded correctly
add print(constants.Bot.token) on line 14 in bot/__main__.py
If you know the token is correct, that feels like it might be misconfigured in the .env file
you can just see it in .env
@short snow
the token is definitely right, because i can copy and paste it in my own code and it loads fine
right, but we're checking to make sure that it's being imported correctly
It can be changing between the env and the logging in
okay
yeah, i was up in message history, so saw something else
that's the site token
what's the variable itself called
should have something like:
BOT_TOKEN=Nz...
BOT_API_KEY=badbot13m0n8f570f942013fc818f234916ca531
okay
try running docker-compose up --build bot
--build will rebuild the docker image ^
invalid token :(
what type of invalid token
from discord or from our API
because it looks like it should be the one from scale starting with badbot
bot_1 | Traceback (most recent call last):
bot_1 | File "/usr/local/lib/python3.8/runpy.py", line 194, in _run_module_as_main
bot_1 | return _run_code(code, main_globals, None,
bot_1 | File "/usr/local/lib/python3.8/runpy.py", line 87, in _run_code
bot_1 | exec(code, run_globals)
bot_1 | File "/bot/bot/__main__.py", line 16, in <module>
bot_1 | bot.instance.run(constants.Bot.token)
bot_1 | File "/usr/local/lib/python3.8/site-packages/discord/client.py", line 718, in run
bot_1 | return future.result()
bot_1 | File "/usr/local/lib/python3.8/site-packages/discord/client.py", line 697, in runner
bot_1 | await self.start(*args, **kwargs)
bot_1 | File "/usr/local/lib/python3.8/site-packages/discord/client.py", line 660, in start
bot_1 | await self.login(*args, bot=bot)
bot_1 | File "/bot/bot/bot.py", line 256, in login
bot_1 | await self.cache_filter_list_data()
bot_1 | File "/bot/bot/bot.py", line 87, in cache_filter_list_data
bot_1 | full_cache = await self.api_client.get('bot/filter-lists')
bot_1 | File "/bot/bot/api.py", line 80, in get
bot_1 | return await self.request("GET", endpoint, raise_for_status=raise_for_status, **kwargs)
bot_1 | File "/bot/bot/api.py", line 75, in request
bot_1 | await self.maybe_raise_for_status(resp, raise_for_status)
bot_1 | File "/bot/bot/api.py", line 67, in maybe_raise_for_status
bot_1 | raise ResponseCodeError(response=response, response_json=response_json)
bot_1 | bot.api.ResponseCodeError: Status: 401 Response: {'detail': 'Invalid token.'}
bot_bot_1 exited with code 1```
Yeah that's from our API
put the bad bot token isntead of cz...
Where did you get the value you put in BOT_API_TOKEN
API token is for PyDis API, not for Discord API
oh
this is the default token you should use
badbot
still the same traceback?
yeah
did you rebuild?
yeah
Do you have config.yml?
yep
Can you show section there about site URLs?
if we are getting response from api, then the urls are correct right?
Actually, can you print the token at that point
at urls?
what do you mean?
so line 14 of __main__,
print(constants.Keys.site_api)```
different constant this time haha
π yes
i don't think you have rbuilt your image
specifically line 337
i dont think so i only had it in my .env but i changed it
do this
i've been running that haha
hmmm, is it in the config.yml like scal said?
nope
hmm, sure?
The only other place it could be in is constants.py
the only thing I can think of now is taking down the bot container, deleting the image, and rebuilding
another thing to proove if rebuild works was, check the image in the var/ of root
and see if the .env is what you want
shall i delete all the files?
Ubuntu 18:04
https://www.freecodecamp.org/news/where-are-docker-images-stored-docker-container-paths-explained/ follow this
Docker has been widely adopted and is used to run and scale applications in production. Additionally, it can be used to start applications quickly by executing a single Docker command. Companies also are investing more and more effort into improving development in local and remote Docker containers, which comes with
and see if the .env and config.yml is what you want
do you know what directory it'll be in? @short snow
containers
image
network
overlay2
plugins
runtimes
swarm
tmp
trust
volumes```
images
where do i go from there?
do docker image inspect bot in the directory of bot/ then you can you can cd into the path of WorkDir
Error: No such image: bot
i did a system prune earlier this week, so the images are building, can cross check once done
do docker-compose ps
docker-compose rm and then docker-compose up --rebuild
ok docker-compose up
uhh, this is getting confusing, show the screenshot
show the output of pwd
/mnt/disks/bkp/root/discord/bot
alright guess what @short snow
i git cloned the repo
and now it works
the bot is online
i just need to change the IDs now
will i have to rebuild after changing the IDs
last time i did this i changed the IDs correctly and the bot stopped working XD
yeah, you would need to rebuild
just do docker-compose up bot
uhh, something happened to mine now π€¦ββοΈ
use_fakeredis: true @short snow
Because they aren't using redisβ¦
ik, but reason for that
Maybe redis wasn't running?
redis was running, its state is Up
Nope. You can just replace them with default ones, or pull them from the cdn.
currently no,
there couldddd be a test server for non staff people, we ppl can make it if itt is fine
I can make one.
I have one already.
i ahve one with all emojis, so anything is fine
#bot-commands
Oh, I don't have all the emojis in mine yet.
get the link, by right clicking on the emoji
Yeah ik.
Can you dm it to me?
got away from pc, will run a eval command once back and send you them 60x
I'll take it :P
!user @swift flower
You are not allowed to use that command here. Please use the #bot-commands channel instead.
what would it be like to have a latex command for @dusky shore?
there are some math questions in the ot channels once in a while
I'd love it. There miiiight be an issue for it? My memory is failing me
don't see anything π
katex, katex, katex, katex
katex is javascript
I mean.... I know. But it's real good
https://pypi.org/project/latex/ seems to be dedicated to it
That would actually be a really fun project.
Oh I know a super easy latex api, lemme see if I can find it really quick
It powers Brainly.com's latex stuff and works pretty well, it's just http://tex.z-dn.net/?f= plus some url-encoded input, ex: http://tex.z-dn.net/?f=abc123
I'm sure there are better options out there but that's something I've used in a hurry before
Oh nice, I was implementing it for my school server, can make one here too if no one else wants to
@obsidian patio was working on one iirc
A latex API?
Iβve looked into making such a command in the past, but not an API for it. I think there was something available, but Iβm not sure about licensing
Not sure what you mean I was working on, then
If we can implement it without an API I think that would be nice
I saw you were making a latex command on the tile set server
I've said this before but the less we can make lancebot dependent on external APIs, or at least minimise the usage, the more educational of a resource it is
yeahhhhhhh
but as far as latex goes
the rendering itself would probably be delegated to some dependency nonetheless
Hmm, I will see if I can find a way without API, I use the api as of now.
rendering latex from scratch
would be
well
hellish
That seems off topic...
Hello @turbid cedar, please don't post your form in random channels. Feel free to post it once in off-topic though!
Which project is this, and what do you have in your config
Also why is it using an outdated python version
Yeah I am just blind
That's the system python where docker-compose is installed scal
That's a compose internal error
Formatted in an awesome way
sudo chown $USER /var/run/docker
Can you try this command @sly trellis?
Does it work now?
Hmm
What does ls -la /var/run | grep docker gives you?

Does ls /var/run/docker gives you anything?
what rpi fwiw?
its looking kinda awkward in matplotlib tbh
like
it looks like it can use latex for the titles and axis labels and such
but
using it just for rendering latex looks kinda hacky-ish
hah, I believe you
Hmm that's weird. Is Docker running? (systemctl status docker)
Alright let's try
sudo usermod -a -G docker $USER
sudo chown docker /var/run/docker
Hmm try with root instead of docker
Alright, does it work now?
Hmm I'm not sure, sorry
Hey @patent pivot , I reviewed your pr for switching to poetry and everything looks good, except the use of taskipy. Everything taskipy is doing can be done using vanilla poetry. Is there a specific reason for using taskipy?
I left a comment π
the task that taskipi accomplishes is allowing running of arbitrary shell commands
and SCALEIOS stop stealing stuff from me
smh we have timestamps
I was reading the docs, and it seems you can do something similar to it https://python-poetry.org/docs/cli/#run
Official documentation of Poetry
yeah, that works butttttt
the commands get long and unrememberable fast
that specifically does python -m <script content>
so while possible, taskipy basically is an alias system for longer commands
Ahhh
if you were to get something like a lint command:
my-script = "flake8"
it would error out with:
at c:\python\python39\lib\site-packages\poetry\console\commands\run.py:36 in run_script
32β def run_script(self, script, args):
33β if isinstance(script, dict):
34β script = script["callable"]
35β
β 36β module, callable_ = script.split(":")
37β
38β src_in_sys_path = "sys.path.append('src'); " if self._module.is_in_src() else ""
39β
40β cmd = ["python", "-c"]
Nah it's alright
this is the upstream PR: https://github.com/python-poetry/poetry-core/pull/40
no worries!
Sorry for the ping joe
all good again π always happy to be pinged about things like this
It seems like such an easy thing to fix on poetrys side...
the reason they haven't is basically because they recommend things like this be adopted through third party plugin scripts, such as taskipy
Ah
which in fairness, taskipy isn't all that bad of a solution, it means that when you enter the venv you can still run such scripts by just doing ```bash
$ task lint
and so on, which is a pretty neat feature
It is pretty cool, yeah
does poetry support using the activated venv
I know pipenv does, albeit with a snarky comment
I think you can just poetry shell
I'm thinking more along the lines of
source ./venv/activate
poetry ..
would that use the activated venv
hmmm
Poetry does create the venv, so in theory you should be able to
well, what I don't know is will it use this venv that I'm using, which is not it's own venv, or will it still try to create its own
The same thing in pipenv would output:
hm? what's the output of pip list
ah nice
Damn nice terminal joe
cheers lol
3.9.2 #python-community do it π
lol
Hey @patent pivot quick question for ya, should we use the US or UK version of the YouTube terms for !ytdl? (bot#1509) They're not much different it's just minor wording differences but yeah lol
UK I think
I'd just stay with UK personally but that's Joe's territory π
might be easier to stick with what we have yeah, but I don't really think it matters at all
Alright, in that case I'll just update the link so it's always pointing to the UK version and switch back the wording to what it was
Thanks a bunch
what happened to #dev-bug-bounty
archived
hahaha don't worry about that
we broached the topic and felt it wasn't really necessary, we might drop a note in #dev-announcements though
:facesad:
show the errors
Did you run pipenv sync --dev?
try running that ^
@short snow What's the difference between partial(x) and x?
partial(x) is like a wrapper around x, while x would make a "copy" of the function
I don't see why you need to copy it though.
You're trying to run it on a raspberry pi, right?
Some dependencies don't publish wheels for ARM, meaning the packages have to be compiled from source. However, our container doesn't include a compiler (cause our production server doesn't use ARM and therefore doesn't need a compiler).
If you want to run it with Docker on ARM then you'll need to modify the Dockerfile to include gcc. Alternatively, you could just run the bot directly on the host, which presumably does have a compiler.
You can selectively start services with Docker. For example, you could run the site, db, and redis with Docker but run the bot on the host.
The instructions for doing it like this are here https://pythondiscord.com/pages/contributing/bot/#run-the-project
We're a large, friendly community focused around the Python programming language. Our community is open to those who wish to learn the language, as well as those looking to help others.
why doesn't quackstack#29 work 
quaclstake
Maybe it wasn't set up yetβ¦
i got u
I should open an issue on quackstack to migrate image code to push to a bucket somewhere
hmmmm
!remind 12h that
Your reminder will arrive in 12 hours!
approve my pr first 
#29
I don't see why quackstack#29 doesn't work 
the funny bit is that manducks were never broken because of course they're still just handled internally
Oh, they aren't?
i just watched all of the netflix "day in the life of a netflix engineer" videos on youtube and am experiencing a craving for devops and ci/cd
watching this is making me very happy
It seems when I do https://api.github.com/orgs/python-discord/repos, quackstack isn't there
Oh, that feels good to see.
yay we're no longer server erroring
nope, it is a task, which is run every hour ig, to fetch the repos
ah, but when I use users (https://api.github.com/users/python-discord/repos), it is there.
yeah, i tested it locally, and found quackstack wasn't in the list
wait wrong long link
sad quackstack noises
we need to do something like https://api.github.com/orgs/python-discord/repos?per_page=100
ill open an issue about fixing that
it's entry 35 on that list
ic
actually should i just PR it since its such a simple fix
Yeah, that's probably better.
yeah
maybe use /users since it's shorter lol
Agreed.
i am bed now goodnight
add a line that installs gcc with apt
sir-lancebot#662
What about quackstack?
Oh, that wasn't approved yet?
I see.
so i messed around some more with matplotlib's latex
and it's not looking too bad
small demo
pretty cool imo
yes
Cool
.
it would be better to open a issue and get assigned to it
My main question for a latex command would be: is it safe to render untrusted latex input with no sort of sandboxing?
We should have a timeout for sure
seems it may allow file read/write by default as well, so may require some other configuration also
@green oriole There are still a number of icon_url present in fetch issues, when the emojis are assigned to it
and it isn't a url, so not sure, if emoji_url fits too, could be issue_emoji or just emoji
Indeed
could always just insert basic latex rendering code into snekbox that prints a base64 of the image data. if the dependencies exist or can be added that is.
Will just go for emoji
mmm, that would be pretty cool, although I reckon it would be pretty difficult to get any latex renderer to run without wanting to produce a temporary file/writing output to a file at some point, and snekbox doesn't allow any disk write access. Might be possible to get around that though, idk
i didnt know how matplotlib renders it, looking it up apparently it does use a default latex renderer
Matplotlibβs LaTeX support requires a working LaTeX installation, dvipng (which may be included with your LaTeX installation), and Ghostscript (GPL Ghostscript 8.60 or later is recommended). The executables for these external dependencies must all be located on your PATH.
thats gonna be pretty impossible then. oof.
(in any case we could always fall back to an external API as a last resort)
We can add a special endpoint with a file buffer but we should avoid using snekbox I'd say
Doing rendering in another thread that we can kill after a few seconds and limiting disk access through configuration sounds like the way to go
What about latex.pythondiscord.com π
another microservice?
New service
bruh what
proceeds to change "I'd like to implement this feature myself" to "Anyone can implement this feature"
soon we will have about a few thousand microservices running, and achieved unlimited scalability.
Nah there is just a running gag saying that we can't refuse a new project neither not rewrite something
Which... isn't totally false
looks like sympy can also do latex with sympy.preview
im kinda confused
what does matplotlib rendering engine mean then
doesn't matplotlib also rely on having latex installed
hmm
You can use a subset TeX markup in any matplotlib text string by placing it inside a pair of dollar signs ($).
Note that you do not need to have TeX installed, since matplotlib ships its own TeX expression parser, layout engine and fonts.
Here at PyDis, if it's possible and reasonable, we do it. So it'll probably end up happening.
not LaTeX, but i think it'll do
will have to research some more about whether this subset also allows file read/write
if it doesn't it'd be a great relief
if it does
sigh
more research
alright
im fairly sure the only thing this allows is symbols, nothing more nothing less
https://matplotlib.org/stable/tutorials/text/mathtext.html has an extensive list of all the valid things
now
as for writing to disk
i don't know if matplotlib does that internally, but the final image itself doesn't really have to be written to disk, we could just save it to a BytesIO object
should i start working on the dpy boilerplate π€
i'll just wait till i get assigned π₯΄
can you link me the issue? I'll assign you now
assigned! go go goooo
lol
Sir Lancebot is pretty popular. π€·
That's just the evergreen folder too π
also, if you want a test server let me know, few of us have set up one
I think it's in the 70's
more
lol
What's the right link for snekbox? Currently http://127.0.0.1:8060/eval isn't working.
@patent pivot
Here's your reminder: that.
[Jump back to when you created the reminder](#dev-contrib message)
@tawdry vapor I thought you were the right person for this: https://github.com/python-discord/bot/pull/1234#issuecomment-792148809
re the latex command, should the bot respond to all messages containing $text$, or should the command have to be specifically invoked?
yo
do i need to make an issue to remove https://github.com/python-discord/sir-lancebot/blob/d76ec41d0d19099488f09677dce50aeae16967b8/bot/resources/evergreen/starter.yaml#L9
i would like to get my first issue even if its just a line
or just go directly to a pr
- If you could have any superpower, what would it be?
- - Name one thing you like about a person to your right.
- If you could be anyone else for one day, who would it be?
Do people want to remove it tho?
Has it been discussed somewhere?
it constantly gets shuned
because there is literally no one to any of our rights
ever, we're on discord
it would make more sense to be Name one thing you like about the last person to send a message.
or just completely remove it
You can't go wrong by opening an issue first
send invite
Consider it done.
send invite
Can someone please help me in #help-pear ?
That would be nice to have if you could send an invitr
Invite*
I'll send you it.
Thanks!!
sir-lancebot#664
I'll take an invite too if someone can send me it :)
Thanks Jay
approved the issue, but this could have gone straight to a PR for a one line fix
Β―_(γ)_/Β―
asked right above lol
I guess that's true, but I think that the reason we have issues is to avoid people doing too much work before we discuss implementation and approve issues, and reduces review time in time. A one line fix isn't really a huge amount of work
yeah
and its not even a code change π
i'll make a pr soon imma about to go to lunch
Exactly, which is why I personally wouldn't encourage issues like this, since it simply pollutes the issue search
I'll probably just delete the issue after the change is implemented
lol ok
Isn't closing enough?
Joe doesn't want to clutter up issue search.


