Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: python script error
Post: python script error

This is from an online course - trying to lay out markers for a drone to navigate. I get an error "bad input" on the line: //*mrks = self.get_markers() import math import numpy as np from plot import...
kendias News and Discussions 0 1,270 Dec-23-2021, 03:45 PM
    Thread: Embedding HTML Code in Python
Post: RE: Embedding HTML Code in Python

Thanks Snippsat. Works fine!
kendias Web Scraping & Web Development 5 4,285 Jan-27-2019, 01:43 AM
    Thread: Embedding HTML Code in Python
Post: RE: Embedding HTML Code in Python

Here is my code. I am using Enthought Canopy. I get error invalid syntax on line 4 i.e. <lat> from bs4 import BeautifulSoup soup = BeautifulSoup(xml, 'html.parser') lat = soup.find('latitude') ...
kendias Web Scraping & Web Development 5 4,285 Jan-27-2019, 01:15 AM
    Thread: Embedding HTML Code in Python
Post: Embedding HTML Code in Python

I am trying to embed HTML in Python, not sure how. Tried importing Beautiful Soup but get error.
kendias Web Scraping & Web Development 5 4,285 Jan-27-2019, 12:37 AM
    Thread: ProbEnthought Canopylems with
Post: RE: ProbEnthought Canopylems with

This also does not work - Syntax error. Kindly help.: soup = BeautifulSoup(xml, 'html.parser') lat = soup.find('latitude') <lat> <latitude>1.123123</latitude> </lat> print((la...
kendias Web Scraping & Web Development 3 2,424 Jan-19-2019, 10:30 PM
    Thread: ProbEnthought Canopylems with
Post: RE: ProbEnthought Canopylems with

Thanks! Works now.
kendias Web Scraping & Web Development 3 2,424 Jan-19-2019, 05:01 PM
    Thread: ProbEnthought Canopylems with
Post: ProbEnthought Canopylems with

I am having problems with Enthought Canopy, whatever my code I get error e.g. for this program I get return [l] ^ IndentationError: unexpected indent although this is a program already published: de...
kendias Web Scraping & Web Development 3 2,424 Jan-19-2019, 02:36 AM
    Thread: Python in Linux environment on RPI
Post: RE: Python in Linux environment on RPI

yes, only with this script below: from gps import * import time import threading f = open("locations.csv","w") gpsd = None class GpsPoller(threading.Thread):  def __init__(self):      threading.Thread...
kendias General Coding Help 22 11,105 Jun-06-2017, 10:42 PM
    Thread: Python in Linux environment on RPI
Post: RE: Python in Linux environment on RPI

Thanks. I tried the foll. and no errors but no printing either: from gps import * import time import threading f = open("locations10.csv","w") gpsd = None def __init__(self):      threading.Thread.__i...
kendias General Coding Help 22 11,105 Jun-06-2017, 09:17 PM
    Thread: Python in Linux environment on RPI
Post: RE: Python in Linux environment on RPI

Thanks. No output after removing comments from script in my previous post but do get output from script below. It prints lat, lon but into the python shell i.e. print works but  f.write does not work....
kendias General Coding Help 22 11,105 Jun-06-2017, 06:53 PM
    Thread: Python in Linux environment on RPI
Post: RE: Python in Linux environment on RPI

Thanks. I put this in the script as below and ran but still get nothing printed to the file and it does not open the file locations.csv : from gps import * import time import threading def run(self): ...
kendias General Coding Help 22 11,105 Jun-06-2017, 12:56 PM
    Thread: Python in Linux environment on RPI
Post: RE: Python in Linux environment on RPI

Thanks. I am able to print the GPS data but not able to write it to a file. The print statement prints the GPS Data into the python shell, but although I am able to get the file to open OK, the "f.wri...
kendias General Coding Help 22 11,105 Jun-06-2017, 01:19 AM
    Thread: Python in Linux environment on RPI
Post: RE: Python in Linux environment on RPI

Thanks. Tried self.running to replace gpsp, no effect. Attempted to take off threading by commenting out threading statements but got errors.
kendias General Coding Help 22 11,105 Jun-03-2017, 02:29 PM
    Thread: Python in Linux environment on RPI
Post: RE: Python in Linux environment on RPI

This is my script - no errors but it does not write to the file "locations.csv" from gps import * import time import threading f = open("locations.csv","w") gpsd = None class GpsPoller(threading.Thre...
kendias General Coding Help 22 11,105 Jun-03-2017, 01:59 AM
    Thread: Python in Linux environment on RPI
Post: Python in Linux environment on RPI

my question here I am trying to run a python script in Linux environment. It is Python 2.7.9 and the script is in folder /home/pi. I use the command f.write to write to the file and although it does o...
kendias General Coding Help 22 11,105 Jun-02-2017, 09:03 PM
    Thread: Putting GPS data into a file
Post: Putting GPS data into a file

my question here I am trying to input data that streams from a GPS module into a file. The file locations.csv opens OK but stays blank with no data input into the file! from gps import * import time...
kendias General Coding Help 0 3,306 May-28-2017, 06:56 PM
    Thread: Python Errors
Post: RE: Python Errors

Thanks. Now using the data I get from my smartphone GPS to do the same job. Using an app to get the data into my computer. So, have to parse it (as before) to get GPS coordinates. Basically the seria...
kendias General Coding Help 26 23,394 May-25-2017, 06:43 PM
    Thread: Python Errors
Post: RE: Python Errors

Here is the traceback. It was posted in the main body in my last post. to_degrees(50,50) TypeErrorTraceback (most recent call last) <ipython-input-222-1cfff49fb11e> in <module>() ---->...
kendias General Coding Help 26 23,394 May-24-2017, 07:04 PM
    Thread: Python Errors
Post: RE: Python Errors

Thanks Buran. I am trying this script to convert from decimal to degrees to use on Google Maps but get errors: # -*- coding: utf-8 -*- import webbrowser import string def to_degrees(lats, longs): # C...
kendias General Coding Help 26 23,394 May-24-2017, 01:50 PM
    Thread: Python Errors
Post: RE: Python Errors

I've been trying to figure it out for the last 4 days - no luck!
kendias General Coding Help 26 23,394 May-23-2017, 09:53 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020