I'm trying to get Chirp to run under Maemo5 (a debian based mobile operating system).
When running .chirpw or setup.py I get this as a result
Nokia-N900:~/compile/chirp-0.3.1# ./chirpw
CHIRP 0.3.1 on Linux - Maemo 5 %h (Python 2.5.4)
Traceback (most recent call last):
File "./chirpw", line 105, in <module>
from chirp import *
File "/root/compile/chirp-0.3.1/chirp/icq7.py", line 50
class ICQ7Radio(icf.IcomCloneModeRadio):
^
SyntaxError: invalid syntax
I am using the chirp source found here: http://chirp.danplanet.com/download/0.3.1/chirp-0.3.1.tar.gz
The idea is to be able to program my radios from my linux powered phone, however I can't seem to figure out why the program is getting held up on the ICQ7Radio class.
Any help/pointers would be much appreciated.
That version is quite old, have a try with latest daily build http://trac.chirp.danplanet.com/chirp_daily/LATEST/
You can also download full hg repository with
hg clone http://d-rats.com/hg/chirp.hg
See also http://chirp.danplanet.com/projects/chirp/wiki/Developers
Related
I am trying to run this line of code to generate a report using pylatex:
doc.generate_pdf(report_name, clean_tex=True)
This works well to generate a pdf file without any error when I use Spyder and Jupyter Notebook to execute the program, but when I try to use Crontab to automate my task by executing the exact same py file every day,
0 6 * * * cd /Users/me/my_folder && /anaconda3/bin/python3 MyProgram.py
the following error occurs via terminal mail:
Traceback (most recent call last):
File "MyProgram.py", line 255
doc.generate_pdf(report_name, clean_tex=True)
File "/anaconda3/lib/python3.7/site-packages/pylatex/document.py", line 299, in generate_pdf
'No LaTex compiler was found\n'
pylatex.errors.CompilerError: No LaTex compiler was found
Either specify a LaTex compiler or make sure you have latexmk or pdfLaTex installed.
I have spent hours searching for solutions online but still cannot fix the bug. So I would like to get some help. Thanks in advance.
I was previously on the path on working towards being able to obtain SEC 10K filings from Edgar, wherein I used a bloggers code for inspiration. When running this code in Pycharm 32-bit, I kept getting a "MemoryError" - which as far as I know is related to not having enough RAM (since 32-bit can only use 4GB).. I have 8GB of DDR3, so I figured if I installed Pycharm 64-bit, I should be ok!
However, when trying to set up the 64-bit version, and installing the same packages that I used previously in order to run the code again, I get the following error:
Collecting python-edgar
Using cached https://files.pythonhosted.org/packages/d0/5d/88b7c392cf9d69c61b418f9f5851292b52964fcde8f3116b2256e2fde5fa/python-edgar-2.3.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\PPB92\AppData\Local\Temp\pip-install-82zmyasf\python-edgar\setup.py", line 13, in <module>
long_description=read('README.md'),
File "C:\Users\PPB92\AppData\Local\Temp\pip-install-82zmyasf\python-edgar\setup.py", line 6, in read
return open(os.path.join(os.path.dirname(__file__), fname)).read()
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\PPB92\\AppData\\Local\\Temp\\pip-install-82zmyasf\\python-edgar\\README.md'
Does anyone know what I can do? I have very limited experience in programming, since I am a graduate student in finance and accounting..
It looks like there is problem in library itself, i have raised the issue on git.
For now you can do:
git clone git#github.com:edouardswiac/python-edgar.git
in your site-packages and under python-edgar folder run :
python setup.py install
Hello there fellow Devs :)
I want to listen for the information given by the MMA8452 acceleration sensor with python.
To do this i want to use the libiio package for python.
To install it I manually built it following the instructions given in this guide
It seemed to be installed fine, cuz I have no Problem importing the Package because it is located in my site-packages folder.
However if I want to do the initial step of creating a context with the "iio.context()"-function, I get this error:
Traceback (most recent call last):
File "./bindings/python/examples/iio_info.py", line 89, in <module>
main()
File "./bindings/python/examples/iio_info.py", line 34, in main
ctx = iio.Context(uri)
File "/usr/local/lib/python2.7/dist-packages/iio.py", line 730, in __init__
self._context = _new_default()
File "/usr/local/lib/python2.7/dist-packages/iio.py", line 33, in _checkNull
raise OSError(err, _strerror(err))
OSError: [Errno 2] No such file or directory
Can someone help me get the iio package working?
For my hardware:
I use the Raspberry Pi3 model B, with Raspberian-stretch-lite v4.9
Thanks in advance,
Holger
You should just need to install the libiio python package to be able to use it. In libiio/bindings/python/ run:
$sudo python setup.py install
Here's a little sample script (Python 2.7) that works on my system, since I have an mcp3204 adc with an iio driver loaded. I used 'apt install python-libiio' to install the python bindings for libiio.
#! /usr/bin/python
import time, iio
ctx = iio.LocalContext()
ctrl = ctx.find_device('mcp3204')
voltages = ['voltage0', 'voltage1', 'voltage2', 'voltage3']
for id in voltages:
chan = ctrl.find_channel(id)
print("{0}: {1}".format( chan.id, chan.attrs['raw'].value) )
i am starting to use Databases and am using MariaDB, Got that ready, but i want Python integration so i can get started on the program.
I have downloaded PyMySQL-0.7.10.tar.gz from the official python website
and have unzipped and have navigated an Command Prompt to there using cd (dir).
My command is:
"G:\Python\Portable\Portable Python 3.2.5.1\App\python.exe" setup.py install
(Yes, i am on Windows 10 and i am using Portable Python. This is because i learn it at school but also want to be able to work at it at home.)
The error it returns is the following:
Traceback (most recent call last):
File "setup.py", line 4, in <module>
version_tuple = __import__('pymysql').VERSION
File "C:\Users\Natan Samuel Geldorp.Remytop-PC\Downloads\PyMySQL-0.7.10\pymysql\__init__.py", line 28, in <module>
from .converters import escape_dict, escape_sequence, escape_string
File "C:\Users\Natan Samuel Geldorp.Remytop-PC\Downloads\PyMySQL-0.7.10\pymysql\converters.py", line 60
_escape_table[0] = u'\\0'
^
SyntaxError: invalid syntax
Does anyone know how to fix this?
-Natan
As requested, as an answer:
You need a newer Python version, in 3.0 to 3.2 the u prefix was forbidden, it was allowed again in version 3.3.
Since Portable Python is no longer being developed (according to their site) you need to pick an alternative. One suggested on the site is WinPython.
(Also the PyMySQL site states that the minimum required Python versions are either >= 2.6 or >= 3.3)
I'm working on a class project (don't worry, this question is not homework) and recently moved from department machines to my own machine.
The project is to build a simple operating system. To make the task easier, we are provided with the ability to "attach" gdb to QEMU in which our program runs. Running this program without attaching gdb on my computer works fine, however it is when I start trying to use gdb that it does not run.
The main thing to note (I think) is that it runs fine on the department computers (gdb 7.4.1-debian) but not on mine (7.6.1-ubuntu).
The error I am getting pertaining to python is that gdb extensions are written in python but they do not seem to be found. I am also getting syntax error. A run of the program looks like this:
/usr/bin/qemu-system-i386
GNU gdb (GDB) 7.6.1-ubuntu
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/alfonso/course/cs167/weenix/kernel/weenix.dbg...done.
After which it hangs for a bit, then gives me this error:
inittmp.gdb:1: Error in sourced command file:
localhost:1234: Connection timed out.
Traceback (most recent call last):
File "/home/alfonso/course/cs167/weenix/kernel/mm/memcheck.py", line 5, in <module>
import weenix
ImportError: No module named 'weenix'
File "/home/alfonso/course/cs167/weenix/kernel/mm/page.py", line 15
print "pagesize: {0}".format(weenix.kmem.pagesize())
^
SyntaxError: invalid syntax
File "/home/alfonso/course/cs167/weenix/kernel/mm/slab.py", line 40
print "{1:<{0}} {3:>{2}} {5:>{4}} {7:>{6}}".format(
^
SyntaxError: invalid syntax
File "/home/alfonso/course/cs167/weenix/kernel/proc/proc.py", line 17
print weenix.proc.str_proc_tree()
^
SyntaxError: invalid syntax
Traceback (most recent call last):
File "/home/alfonso/course/cs167/weenix/kernel/util/debug.py", line 3, in <module>
import weenix
ImportError: No module named 'weenix'
Traceback (most recent call last):
File "/home/alfonso/course/cs167/weenix/kernel/util/list.py", line 3, in <module>
import weenix
ImportError: No module named 'weenix'
Breakpoint 1 at 0xc0008f04: file util/debug.c, line 190.
Breakpoint 2 at 0xc0007016: file main/kmain.c, line 298.
Breakpoint 3 at 0xc0006cf3: file main/kmain.c, line 129.
init.gdb:6: Error in sourced command file:
The program is not being run.
Of course, the import errors and invalid syntaxes made me initially think about my PYTHONPATH and/or package settings, but that is something that works fine (tested it). The only thing I can think of is that I have some configuration problems that I am overlooking.
If you would like me to, I can post the bash script, .gdb files and the rest, but since this works fine on department computers, I doubt this is the problem.
Python versions: (department: "2.7.3", me: "2.7.5+")
EDIT:
After some searching, I have realized that the newest Linux Mint(petra) uses gdb that interprets python as python3. I am currently looking for a way to configure gdb, but as I have never done it before, I would appreciate if someone could direct me in doing so.
You use Python 3 for this debug mode.
$ python3 test33.py
File "test33.py", line 1
print "hello".format()
^
SyntaxError: invalid syntax
Make sure you use Python 2 as you say.
I'm doing this homework, too. (I guess weenix is too commonly used for OS courses.)
Regarding "import weenix" problem, it's because weenix's python script isn't in gdb's data directory. When using gdb with python, this dir will be added to python's PATH automatically. Therefore, just put "weenix/python/weenix" under your data directory/python. As for me, it's /usr/shared/gdb/.
Having fun with weenix!