You are not logged in.
By the way, any Python nerds in this forum? Experienced in sqlalchemy?
(This is Devuan-related in the sense that the host OS is Devuan Chimaera. Inside and outside the vm. ')
First time in 10 years i try to write a simple app with Flask and SQLAlchemy. Should be a simple thing, but more the instructions i read, the more confused i become. A three day parade march to Kabul is turning into a 10-year-long-nightmare-in-the-mountains.
I mean, it should't bee too difficult to:
1. set up connection to a pre-existing db
2. query a table with user-provided value
3. show result back to user somehow
But i have been running into many kinds of errors today.
I think setting up the conn works
e=sqlalchemy.create_engine(<A_CONNECTION_STRING>, echo=True)
conn=e.connect()at least i get no complaints from Flask.
I query the table with:
metadata=MetaData()
c=Table('table1', metadata, autoload_with=e)
q=c.select().where(c.id_field==user_provided_id)
res=conn.execute(q).fetchone()... and couldn't get to phase #3 . There were all kinds of complaints. For example:"AttributeError 'Table' object has no attribute 'id_field' ".
I have confirmed, with psql that i can connect to the db with the connectionstring(to be more precise:login, password and other params) i have. Also i have confirmed that name of the table and column are right. There also should be row with the id value i tried with.
Any working example code anaywhere which does what i'm looking for?
I mean i have read some of the sqlalchemy docs. Also tried https://www.datacamp.com/tutorial/sqlal … l-examples and https://www.blog.pythonlibrary.org/2010 … databases/ . To no avail.
One thing that can complicate simple things is Docker. I use bitnami/python:3.8.17. Tried also bitnami/python:latest. No difference, the Flask app is still not working.
Nothing surprising in Dockerfile: WORKDIR , COPY requirements.txt into container and RUN pip -r requirements.txt . And outside of Dockerfile, mount the app directory.
Inside vm, "dpkg -l docker*" says:
ii docker-compose 1.25.0-1
ii docker.io 20.10.5+dfsg10+deb11u2And requirements.txt pip uses says, amongst other things:
Flask==3.0.0
psycopg2-binary==2.9.9
SQLAlchemy==2.0.22There were also line: "flask-sqlalchemy==3.1.1". But i commented that out. To see if something changes. Nope. Not in a way that matters.
I suspect that those packages installed by pip also complicate a task that should be simple. New version of every package comes out 2 or 3 times a day and no one bothers to check if they work as intended or not. Which versions should work? Should i comment out flask-sqlalchemy or SQLAlchemy? Commenting out both will definitely prevent the db connection.
Somehow i'm not surprised that SQL injection is still a thing in 2020'ies. It seems that devs are forced to do queries in a very primitive and dangerous way.
Also it seems that it is mandatory to use scripting language abominations from the 1990'ies to get anything done at all.
Guess i'll look into that asound-thing some day. I may get bored booting with "super grub disk"-method, and kill 2 birds with 1 stone.
Not yet fully convinced that this sound problem is about configuration, but i'll find out soon enough.
https://www.youtube.com/watch?v=hJ-qU1nW0o0&t=0s Therion - Ginnungagap
not so much into Therion but this song sounds little like Bathory.
I had few installation attempts with sd cards. There were some problems. After that i have preferred optical discs as installation media.
Last weekend i tried chimaera netinstall on virtual machine. There were some problems also. I could install into a vm allright. But couldn't install any packages with apt. Not yet sure why. The usual suspects:
a) mis-configured apt
b) virtualbox problems i've been having lately
c) temporary network problems
d) something completely different.
I started using VBox with Squeeze if I remember correctly, and I haven't got any issues with "disk full" or access problems to USB drives.
Well, I have always avoided the default of using my home drive to store the VMs. From the beginning I have had a separate partition or drive for them. Its easy to configure in the options of the Virtualbox Manager.
Beside the point. Haven't yet confirmed what happens if /mnt/vbox runs out of storage but i wouldn't trust the .vdi-files to propertly store my files on that situation either.
Speaking of "doing non-default-things with vbox", i have tried virtual machine files on usb harddrive and virtual machine files on samba share, with just a .vbox-file on /home. It was a bit difficult but kind of worked. The most recent version of vbox then was 5.something.
I think running some light software inside vm wouldn't cause problems. I mean not eating too much storage or ram or processor capacity.
But couple of months a go it seemed like a good idea to install Docker inside a vm instead of outside. The iptables rules that Docker insists on wouldn't interfere with the iptables rules i wrote. And problems with dns and Docker would go away also. (Dockerd sees only the dns server that vbox runs, not dnsmasq or anything like that.)
On the other hand, you can fill up your /var very fast by pulling all kinds of images and building containers.
Maybe the usb-problem is not fully vbox's fault. Recently bought a new usb-mouse and found out that the older one co-operates little better with Fujitsu.
I also run apt-get install and apt-get upgrade -u recently, so some package may have broken usb somehow. On the other hand, problems with external mouse start after starting virtualbox.
also:
dmesg | grep -i snd
[ 65.384762] snd_hda_intel 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[ 65.468638] snd_hda_codec_realtek hdaudioC0D0: ALC255: SKU not ready 0x909701f0
[ 65.468758] snd_hda_codec_realtek hdaudioC0D0: autoconfig for ALC255: line_outs=1 (0x14/0x0/0x0/0x0/0x0) type:speaker
[ 65.468760] snd_hda_codec_realtek hdaudioC0D0: speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[ 65.468761] snd_hda_codec_realtek hdaudioC0D0: hp_outs=1 (0x21/0x0/0x0/0x0/0x0)
[ 65.468763] snd_hda_codec_realtek hdaudioC0D0: mono: mono_out=0x0
[ 65.468764] snd_hda_codec_realtek hdaudioC0D0: inputs:maybe the second line is a good starting point, maybe not.
It has been a while since i had any audio-related problems with linux.
About 12 years ago, i upgraded Debian 4 to 5 or 6 and sometimes i couldn't get any sound out. I fixed that by saying "chmod o+rw /dev/dsp" as root.
Now it seems that there is no such thing as /dev/dsp anymore.
And the problem is, with this Fujitsu Lifebook U728 machine+Devuan Chimaera as OS,i can't get any sound out of it.
Audio mixer->Output Devices->show hardware outpur devices doesn't show any device at all.
Once played around with alsamixer. Didn't do anything at all.
Found this: https://bbs.archlinux.org/viewtopic.php?id=265211 , tried that "options snd-intel-dspcfg dsp_driver=1"-thing. Still hearing only the sound of silence.
Any ideas what to try next?
"lspci | grep -i audio" says:
00:1f.3 Audio device: Intel Corporation Sunrise Point-LP HD Audio (rev 21)"lspci | grep -i sunrise" says also:
00:15.0 Signal processing controller: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #0 (rev 21)
00:15.1 Signal processing controller: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #1 (rev 21)those lines may have something to do with that "dsp_driver=1"-thing.
"lsmod | grep snd" says:
snd_hda_codec_hdmi 73728 1
snd_hda_codec_realtek 167936 1
snd_hda_codec_generic 98304 1 snd_hda_codec_realtek
ledtrig_audio 16384 1 snd_hda_codec_generic
snd_soc_skl 180224 0
snd_soc_hdac_hda 24576 1 snd_soc_skl
snd_hda_ext_core 36864 2 snd_soc_hdac_hda,snd_soc_skl
snd_soc_sst_ipc 20480 1 snd_soc_skl
snd_soc_sst_dsp 36864 1 snd_soc_skl
snd_soc_acpi_intel_match 45056 1 snd_soc_skl
snd_soc_acpi 16384 2 snd_soc_acpi_intel_match,snd_soc_skl
snd_hda_intel 57344 0
snd_intel_dspcfg 28672 2 snd_hda_intel,snd_soc_skl
soundwire_intel 45056 1 snd_intel_dspcfg
snd_soc_core 319488 3 soundwire_intel,snd_soc_hdac_hda,snd_soc_skl
snd_compress 32768 1 snd_soc_core
snd_hda_codec 176128 5 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec_realtek,snd_soc_hdac_hda
snd_hda_core 110592 8 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_ext_core,snd_hda_codec,snd_hda_codec_realtek,snd_soc_hdac_hda,snd_soc_skl
snd_hwdep 20480 1 snd_hda_codec
snd_pcm 143360 8 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,soundwire_intel,snd_compress,snd_soc_core,snd_soc_skl,snd_hda_core
snd_timer 49152 1 snd_pcm
snd 110592 10 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek,snd_timer,snd_compress,snd_soc_core,snd_pcm
soundcore 16384 1 sndSo, any ideas how to make xfce's audio mixer find that sunrise audio device?
Quick solution would be to buy an usb soud card. I know one card that Just Works or at least it used to.
But it would be better to make the internal sound chip work.
I think it is too buggy for "production use".At least that version which i downloaded from virtualbox.org's repository.
In last 4 months i have encountered 2 times "VDI_DISK_FULL"-complaint.
The second time it became clear to me that cause was /home running out of space.
One nice thing related to that:at least when /home is full or almost full, i cannot trust virtual harddrives of vbox.
First found out that there was some files missing inside the vm. Copied them from another vm's vhd.
Next thing i found out that the contents were wrong. I know i commented out that part of script but now i have to comment that out again. And try to remember what other changes i have made after commenting out that particular part.
Luckily i have made backups into usb stick.
... and the next funny thing was that usb devices stopped working properly. Vm couldn't find any usb stick at all although usb filters should "capture" all devices.
...and mouse not working either. Had to log out and in again to make usb work in the host side.
Maybe it is just this particular hw+sw that is the problem. Unfortunately i have only 1 computer with recent enough processor to run vbox.
I'll try 6.1 if that co-operates better. If that doesn't work, i'll have to move to Xen or something.
I was hoping that i don't have to make backups or restore from hdd again. But i can do it if i really have to.
Btw, one thing i noticed:audio is not working. Tried some youtube videos and i can't hear a thing. Maybe it is just about volume, maybe about something else. Any ideas how to fix that?
Edit. found this:https://bbs.archlinux.org/viewtopic.php?id=265211 . I'll try that "options snd-intel-dspcfg dsp_driver=1"-thing soon.
Hi rolfie, a quick question please.
Is this specific to the .deb file downloaded from the virtualbox site? I use the virtualbox packages from debian - fast track repo for chimaera, daedalus, and excalibur - and the regular repo for ceres.
It's tricky when you install debian's packages into devuan. Might work, but might not also. Nice to know that in this case, vbox could work.
Complaints about usb enumeration went away after upgrading the extpack. Tried the vm once, it was a bit slow to notice, but finally cat /proc/partitions showed /dev/disk/by-uuid/usb-stick.
The essential parts of the problem are in the subject.
Almost 4 months ago i installed virtualbox 7 by adding "deb [arch=amd64 signed-by=/usr/share/keyrings/oracle-virtualbox-2016.gpg] https://download.virtualbox.org/virtualbox/debian bullseye contrib" . Also installed then-current extension pack from virtualbox.org . /sbin/vboxconfig and update-initramfs also done. Vbox found memory stick allright. Back in the day when my "new" desktop was still working.
(Maybe installing version 6.x would have been a better idea, i think.)
Now i had to start using Fujitsu. Copied partitions into ssd from hdd by using dd.
I have done that "/sbin/vboxconfig" -trick again. Also update-initramfs and update-grub. Still, with Fujitsu, vbox can't enumerate usb devices. And inside vm i cannot find the attached memorystick. Lsusb cannot find it, nor can cat /proc/partitions.
Any ideas what to try next?
I have recently run apt-get upgrade -u and downloaded also the most recent version of extension pack for installing. Will install the new one soon.
How about users and groups? Should the normal_user belong to some group in order to be able to use usb-devices?
Again, i wasn't precise enough with my previous message.
Not planning to make a mixture of new and old /.
The thing is:I don't want do destroy or format my /home-partition on Fujitsu. It will take some time to copy it back from hdd via usb.
I also need to keep the old / around long enough to copy some necessary files from /etc. Now i think that i got the contents for most of those files right, abt 4 months ago.
On the other hand, i think that configuration files i extracted from a memory stick are mostly unusable rotten crap.
Also root on lvm for new / would be nice but not absolutely necessary. Although no need to destroy previous vg containing /home for that.
So, bypassing the partitioning-part in installation process seems like a good idea.
Btw. should it be possible to install Devuan on a pre-existing partition?
I prefer not to erase/delete/format the / or /home i have copied into Fujitsu's ssd. I know that with Debian there at least was something called "debootstrap". I remember that with that there was an option to skip the partitioning/formatting-parts of the installation process.
Can refractainstaller do that?
Note to self:when booting from "super grub2 disk" i got this error msg:"waiting for /dev to be fully populated ... tpm-crb msft0101.00 can't request region from resource [mem 0x9a<something_1> - 0x9a<something_2>]".
The base system, which is the same on all, is just a so called "minbase" debootstrap (with a couple of extras). It serves as a starting point for installing the chosen end-user flavour and is not really intended to be an installation end-point.
This sounds intresting. Is there a way i could get "the absolute minimal version of Devuan os" as .iso-file somehow?
I liked the minimal live but i don't completely agree with the choice of packages it has.
Ian McEwan:machines like me.
At first it was boring but then the writer introduced Alan Turing and all that "P vs NP"-stuff.
There is no need for any init script for simple applications like firefox(-esr), libreoffice, vlc, virtualbox ....
I'll have to confirm the "virtualbox-situation" but if i remember correctly what i saw in july was some vbox-related scripts under /etc/init.d . I had to link them with "ln -s" in order to make virtualbox work properly. Or maybe i had to run update-initramfs or mkinitramfs to make vbox work. It was a very fuzzy july morning.
Not much difference between being sleep deprived or being drunk.
nahkhiirmees wrote:I guess distros with systemd work in a sense that i can run firefox and vlc and virtualbox and stuff like that.
There is no need for any init script for simple applications like firefox(-esr), libreoffice, vlc, virtualbox ....
Starting firefox from initscript is not what i meant.
I meant that it is possible to do mundane stuff with systemd-distro as well as with non-systemd-distro.
Couple years ago i changed my main os to Devuan partly because there were other things than systemd in then-current-Debian that i didn't like. The systemd-thing was just icing on the cake.
https://www.youtube.com/watch?v=JHq9yMXw3iA Opeth - Cusp Of Eternity
after 20+ years of blastbeats , progressive stuff starts to sound more interesting. Maybe information theory has something to do with that.
Hi there,
I upgrade Debian for the ROC-RK3328-CC into Devuan but I feel I missed some important network packages, since, personally, the Debian image provided by Libre.Computer was very opinionated.
On my Devuan desktop installation I have these packages installed:
$ aptitude search '~i ~d network' i A avahi-autoipd - Avahi IPv4LL network address configuration i A avahi-daemon - Avahi mDNS/DNS-SD daemon i A avahi-utils - Avahi browsing, publishing and discovery u i A dbus-system-bus-common - simple interprocess messaging system (syst i A dirmngr - GNU privacy guard - network certificate ma i A gir1.2-nm-1.0 - GObject introspection data for the libnm l i A glib-networking - network-related giomodules for GLib i A glib-networking-common - network-related giomodules for GLib - data i A glib-networking-services - network-related giomodules for GLib - D-Bu i A iftop - displays bandwidth usage information on an i ifupdown - high level tools to configure network inte i iproute2 - networking and traffic control tools i iputils-ping - Tools to test the reachability of network i A libaudio2 - Network Audio System - shared libraries i A libavahi-client3 - Avahi client library i A libavahi-common-data - Avahi common data files i A libavahi-common3 - Avahi common library i A libavahi-core7 - Avahi's embeddable mDNS/DNS-SD library i A libavahi-glib1 - Avahi GLib integration library i A libmng1 - Multiple-image Network Graphics library i A libnet-netmask-perl - module to parse, manipulate and lookup IP i A libnm0 - GObject-based client library for NetworkMa i A libnma-common - NetworkManager GUI library - translations i A libnma0 - NetworkManager GUI library i A libnss3 - Network Security Service libraries i A libqt5network5 - Qt 5 network module i A libsnmp40 - SNMP (Simple Network Management Protocol) i A libsodium23 - Network communication, cryptography and si i libuuid1 - Universally Unique ID library i net-tools - NET-3 networking toolkit i netbase - Basic TCP/IP networking system i A network-manager - network management framework (daemon and u i A network-manager-gnome - network management framework (GNOME fronte i pngquant - PNG (Portable Network Graphics) image opti i rfkill - tool for enabling and disabling wireless d i tigervnc-viewer - Virtual network computing client for X i traceroute - Traces the route taken by packets over an i A xfce4-netload-plugin - network load monitor plugin for the Xfce4 $ aptitude search '~i ~d dhcp' i A avahi-autoipd - Avahi IPv4LL network address configuration i A dnsmasq-base - Small caching DNS proxy and DHCP/TFTP serv i isc-dhcp-client - DHCP client for automatically obtaining an i isc-dhcp-common - common manpages relevant to all of the iscBut which are the mandatory ones?
Thanks 🙏
If you're using DHCP, "isc-dchp"-packages are necessary i think. I would keep net-tools, netbase, iproute2 and ifupdown also. Traceroute for debugging purposes.
Ok, removal of libavahi-packages may have unwanted side-effect so better to keep them for now.
The other ones are not so "mandatory". If you're using gpg for something, dirmngr may be necessary.
If you know how to edit files under /etc/network , network-manager-* packages are pointless.
And if you need to connect to other computers with vnc, tigervnc is necessary, otherwise not.
The most recent w10 install iso fixed EFI partition alright. But installed w10 sees changes made with grub-install as a damage and repairs them. (Or that's what the situation looked like last week.)
So i'll need an older version of that .iso. And also few more memory sticks. In theory you can write to them many times. In practice they are write-once-media. Those sticks have a tendency to stop working properly after few rewrites. Optical discs were more reliable.
The super grub disk2, non-hybrid variant, was able to boot from /boot partition. Few times out of several. It would be nice if i could improve that propability somehow.
It is very uncertain if or when i'll get a chance to fix those problems with tables and dns.
I'm not happy about this but it seems that i have to use windows and copy linux stuff inside a virtual machine, and fix things there. Assuming that this particular Fujitsu co-operates with virtualbox or another software.
Lord Anubis needs some new hosts soon. Current ones won't do.
Edit:optical disks with external dvd drive worked a little better than usb sticks. Have to reinstall w10 and D4 someday.
https://www.youtube.com/watch?v=crs4Shbe4e4&t=1209s PAIN - Coming Home
I guess i should have changed tables rules and install+configure dns stuff *before* i started removing unnecessary packages. The removal of unnecessary packages caused removal of iptables also and after that things went kind of complicated.
Anyways, dd or cp from hdd to sdd is still an option.
Friday night it came clear to me that my "new desktop" is not working anymore. Much more trouble than it is worth. So i started to work on that Fujitsu. First i tried to make a temporary install, see how far i can go on , before dd'ing /home and / from hdd. Experiment didn't go that well. Partly because there may be something wrong with those configuration files i extracted. And partly because i copied wrong iso into stick. In july, the one that had "f89ac..." as hash worked. I mean worked with my desktop. Easy hardware.
The iso that i tried first this weekend, https://files.devuan.org/devuan_chimaer … esktop.iso didn't work as well (w/ Fujitsu).
Now i have erased previous partitions in Fujitsu and made a working EFI partition with windows10 install iso (yuck). And used daedalus amd64 desktop iso in rescue mode to copy /boot and / from hdd. When trying to grub-install /dev/sda inside that copied partition, i ran into error "/boot/grub/x86-64-efi:no such file or directory". So either i run grub-install again from the installer environment or install efi-version of grub into that /-partition. Let's see how it goes.
One thing i noticed with Daedalus: the manual partition tool was getting my way when trying to do things. How about giving an option to jump into a shell and giving the necessary commands by hand? In the partition menu i mean. To accompany those automatic and manual modes.
This "laptops and memory sticks"-thing is no country for old men.
In /etc/default/grub there's keyword GRUB_DISABLE_LINUX_UUID . But somehow i doubt that commenting or uncommenting it would help.
I suspect that there is some kind of hardware+software-combination which makes a simple thing complicated, like during 2008 with Debian.
Have to try again tonight. Before i went to sleep, i erased the EFI partition as a last resort, didn't know what else to do. Now i have to find out if i can get out of that partitioning process with EFI erased. I'm worried that i have to re-install windows to Fujitsu so that i can get a proper EFI-partition back. Yuck.