Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3785012
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T11:27:49+00:00 2026-05-19T11:27:49+00:00

It might be a easy problem but I don’t seem to figure it out.

  • 0

It might be a easy problem but I don’t seem to figure it out. I’m using GeoDjango and I have a latitude and a longitude that I converted into strings (see my_lat and my_long).

For some reason it doesn’t like the my_long_lat variable when I use it inside the fromstr(‘POINT(my_long_lat)’) and I get this error:

String or unicode input unrecognized
as WKT EWKT, and HEXEWKB

My code:

my_lat = str(lat)[1:10]
my_long = str(long)[21:31]
my_long_lat = my_long + " " + my_lat
mypoint = fromstr('POINT(my_long_lat)')

Just to make sure the variables my_lat and my_long have the right data I printed them and they show these values: 30.751277 for my_lat and -101.25 for my_long.

If I just type the values like this:
mypoint = fromstr(‘POINT(-101.25 30.751277)’)
there are no errors generated but evidently I need to use variables to pass the data in.

Any ideas? Thank you!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T11:27:50+00:00Added an answer on May 19, 2026 at 11:27 am

    This line is being interpreted literally:

    fromstr('POINT(my_long_lat)')
    

    Try

    fromstr('POINT(' + my_long_lat + ')')
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been struggling with a problem that at first glance might look easy
This might seem an easy question for some, but I am struggling with it.
There might be an easy solution here, but it seems to have me tripped
This might seem like a very easy question for some of you folks, but
We're considering using Python (IronPython, but I don't think that's relevant) to provide a
Might be my question is too easy, but I don't know how to resolve
I know this might sound easy. I thought about using the first dot(.) which
This might be ridiculously easy for you but I've been struggling with this for
This might be an easy one, but I'm not really experienced with sql. I
I know this might be very easy to some,, I have a simple string

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.