pyautogui position return the same value always - pyautogui

I am having trouble with Pyautogui on Fedora 31.
import pyautogui
pyautogui.FAILSAFE= False
while True:
print(pyautogui.position())
The error is that it does not matter where I move my mouse, in what windows or what screen. It always give me the same position:
Point(x=39, y=39)
...
Point(x=39, y=39)
Point(x=39, y=39)
Someone Knows? , I think that it could be a problem of packages, especifically python3-tkinter. though I have it (El paquete python3-tkinter-3.7.6-2.fc31.x86_64 ya está instalado.)
In Windows 10 it works perfect, but in Fedora 31 does not.
Greetings

Related

GNU Radio + HackRF: RuntimeError: firdes check failed: 0 < fa <= sampling_freq / 2

I just started using GNU Radio, I must say I am quite a noob but I have some background on RF related stuff.
Here's the thing:
I recorded a file that I now want to repeat through my HackRF and GNU Radio.
This is the exact settings for the filter:
The settings you see are casual (since I cannot get it working I started testing with random values).
This is the error I get:
Executing: /usr/bin/python3 -u /home/scare/LAB/RadioFrequencies/GNU Radio/reply_433.py
gr-osmosdr 0.2.0.0 (0.2.0) gnuradio 3.8.2.0
built-in sink types: uhd hackrf bladerf soapy redpitaya file
[INFO] [UHD] linux; GNU C++ version 11.1.0; Boost_107600; UHD_4.0.0.0-0-unknown
Using HackRF One with firmware 2017.02.1
Traceback (most recent call last):
File "/home/scare/LAB/RadioFrequencies/GNU Radio/reply_433.py", line 211, in <module>
main()
File "/home/scare/LAB/RadioFrequencies/GNU Radio/reply_433.py", line 187, in main
tb = top_block_cls()
File "/home/scare/LAB/RadioFrequencies/GNU Radio/reply_433.py", line 137, in __init__
firdes.high_pass(
File "/usr/lib/python3.9/site-packages/gnuradio/filter/filter_swig.py", line 124, in high_pass
return _filter_swig.firdes_high_pass(*args, **kwargs)
RuntimeError: firdes check failed: 0 < fa <= sampling_freq / 2
Done (return code 1)
Where obviously the interesting part is the RuntimeError: firdes check failed: 0 < fa <= sampling_freq / 2
Unfortunately, I don't get what that 'fa' stands for.
Any idea?
Cheers
I just got done solving this same error. The error is caused by a filter's Cut-off and transition parameters being set incorrectly (in my case far too large). GNU radio handles the variable 'samp_rate' differently for each block and filters seem to interpret it was a point to center the filter on (that's my take on it so don't quote me).
I also looked in the source code and can't find anything helpful on 'fa'
So try adjusting your cutoff to be something below samp_rate and make your transition width something to the tune of 250e3. I used GUI sliders to set the filter how I liked and I will make these permanent in the final version.
Screen Cap of Settings Here
Slider Settings For Both Sliders
Mike Ossmann's "SDR with HackRF One, Lesson 10 - Filters helped" me out here. Also just a great SDR lecture series for GNU radio if you haven't come across them yet. (just make sure to use the QT GUI).
I hope this helped. I am pretty new to GNU so sorry if the explanation is a little half-baked.
fa is the cutoff_frequency in the function that is throwing the error message. The cutoff frequency has to be greater than 0 and no more than the Nyquist limit. There are some functions called sanity_check_xxx (xxx being whether one cutoff or 2, i.e. bandpass, and optionally c for complex) around line 750 in gr_filter/lib/firdes.cc in the GNU Radio repository on GitHub.
In the question the samp_rate would need to be at least 800MHz to support a high pass cutoff of 400Mhz. As far as I can tell sample rate is used the same way in these filter functions as anywhere else in GNU Radio.
I ran into the same error message because I used 'firdes.band_passinstead offirdes.complex_band_pass` and the low cutoff was negative, which it should be for the complex band pass filter.

GNU Octave Vertical Dimensions Mismatch

I've been getting the following error in GNU Octave:
error: vertical dimensions mismatch (1x2 vs 1x3) error: called from
ProjectPart1 at line 31 column 4
based on this code (in a for/end loop after zeta(:,1)):
zeta(:,1)=[sum(beta)/lambda,P0];
N=[-lambda,sum(beta);lambda/gen,(rho-sum(beta))/gen];
zeta(:,i)=zeta(:,i-1)+N*zeta(:,i-1)*dt;
I ran this a month-ish ago and I remember it working, any idea why it's not working now?
Edit:
Here's the whole thing. I've tried switching things around, restarting the program, and restarting my computer. Is uninstalling and reinstalling worth it (since one commenter said it worked fine for them)?
lam=[0.0128,0.0318,0.119,0.3181,1.4027,3.9286];
beta=[0.000258,0.00152,0.001391,0.00307,0.001102,0.000258];
P0=1e-6;
a=8*sum(beta);
lambda=((beta(1)*lam(1))+(beta(2)*lam(2))+(beta(3)*lam(3))+(beta(4)*lam(4))+(beta(5)*lam(5))+(beta(6)*lam(6)))/sum(beta);
hold off;
box on;
gen=2.6E-5;
dt=.001;
secint=.125/dt;
t(1)=0;
zeta(:,1)=[sum(beta)/lambda,P0];
rho(1)=0
for i=2:secint
N=[-lambda,sum(beta);lambda/gen,(rho-sum(beta))/gen];
zeta(:,i)=zeta(:,i-1)+N*zeta(:,i-1)*dt;
t(i)=t(i-1)+dt;
rho(i)=a*t(i);
end
The vertical dimensions error is specifically pointing to this line:
N=[-lambda,sum(beta);lambda/gen,(rho-sum(beta))/gen];

Pygame exit code 139

PIXAR = pygame.PixelArray(SCREEN)
PIXAR[110][0] = WHITE
When I add this to my code, I get:
Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)
followed by a OS message that python quit unexpectedly. If I remove it:
Process finished with exit code 0
I can't seem to find a solution; the 1.9.2 manual does not explain this. If I'm missing it in the reading, can someone please point me in the right direction?
I think PIXAR is a two dimensional array. It should be accessed with PIXAR[110,0] instead of PIXAR[110][0].

Octave crashes on matrix multiplication of dimension 52 by 52

magic(5) * magic(5) // works
magic(52) * magic(52) // fails
panic: Illegal instruction -- stopping myself...
attempting to save variables to 'octave-core'...
save to 'octave-core' complete
I am on Ubuntu 13.04, 32 bit, linux kernel 3.8.0-31-generic
I tried uninstalling atlas as mentioned here but could not find libatlas3gf-base so removed fgfs-atlas instead but that did not work.
Install the following packages first
libblas3gf
libblas-doc
libblas-dev
liblapack3gf
liblapack-doc
liblapack-dev
And if that does not work, search for 'blas linear' in your software package manager and install all except for Java,python,perl etc.
Ref: http://ubuntuforums.org/showthread.php?t=1505249

Problem with conflict between mysql and math.h

The problem is that the compiler says that there is a redefinition of a function between a library that belongs to MySQL and math.h from the std library.
I have been over this for two days and I still can't figure it out.
Has this ever happened to anyone?
This is the output from the compiler
C:\mingw\bin\mingw32-make.exe all
'Building file: ../src/interfaz/ventanaconf.cpp'
'Invoking: GCC C++ Compiler'
C:\mingw\bin\mingw32-g++.exe -mms-bitfields -I"c:\dev-cpp\gtkmm\include\gtkmm-2.4"
-I"c:\dev-cpp\gtkmm\lib\gtkmm-2.4\include" -I"c:\dev-cpp\gtkmm\include\glibmm-2.4"
-I"c:\dev-cpp\gtkmm\lib\glibmm-2.4\include" -I"c:\dev-cpp\gtkmm\include\gdkmm-2.4"
-I"c:\dev-cpp\gtkmm\lib\gdkmm-2.4\include" -I"c:\dev-cpp\gtkmm\include\pangomm-1.4"
-I"c:\dev-cpp\gtkmm\include\atkmm-1.6" -I"c:\dev-cpp\gtkmm\include\sigc++-2.0"
-I"c:\dev-cpp\gtkmm\lib\sigc++-2.0\include" -I"c:\dev-cpp\gtkmm\include\cairomm-1.0"
-I"c:\gtk\include\gtk-2.0"
-I"c:\gtk\include\glib-2.0"
-I"c:\gtk\lib\glib-2.0\include"
-I"c:\gtk\lib\gtk-2.0\include"
-I"c:\gtk\include\pango-1.0"
-I"c:\gtk\include\cairo"
-I"c:\gtk\include\freetype2"
-I"c:\gtk\include"
-I"c:\gtk\include\atk-1.0"
-I"c:\Archivos de programa\MySQL\MySQL Server 5.0\include"
-O0 -g3 -w -c -fmessage-length=0 -MMD -MP -MF"src/interfaz/ventanaconf.d"
-MT"src/interfaz/ventanaconf.d"
-o"src/interfaz/ventanaconf.o" "../src/interfaz/ventanaconf.cpp"
In file included from c:/Archivos de programa/MySQL/MySQL Server 5.0/include/my_global.h:73,
from ../src/interfaz/../gestiondb/gestordb.h:6,
from ../src/interfaz/../gestiondb/operacionesdb.h:5,
from ../src/interfaz/ventanamodulos.h:20,
from ../src/interfaz/ventanaconf.h:27,
from ../src/interfaz/ventanaconf.cpp:1:
c:/Archivos de programa/MySQL/MySQL Server 5.0/include/config-win.h: **In function `double rint(double)':
c:/Archivos de programa/MySQL/MySQL Server 5.0/include/config-win.h:228: error: redefinition of `double rint(double)'
C:/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/math.h:620: **error: `double rint(double)' previously defined here**
C:\mingw\bin\mingw32-make.exe: *** [src/interfaz/ventanaconf.o] Error 1**
Thanks in advance!!!
This thread in the mysql support area seems to indicate that they've taken the definition of rint() out of their config_win.h file as of April this year (even though the patch was proposed in 2006). Are you using a version of the MySQL source newer than that?
The problem was about an included library, which linux simply ignores, but windows want out. There is no problem letting it out in linux neither...
Somedays i feel SOOOOOOOOOOOOOOOOOOOOOOO STUPID:..
In line 228 of c:/Archivos de programa/MySQL/MySQL Server 5.0/include/config-win.h you should find a declaration/definition of function named "rint". In line 620 of C:/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/math.h you should find another definition of a function with the same name (which probably even does the same).
To solve the problem you will have to delete/outcomment/undefine one of these definitions.
Be prepared to get a similar problem when linking, if you also link two libraries with the same function.