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
We're considering using Python (IronPython, but I don't think that's relevant) to provide a
This might seem like a stupid question I admit. But I'm in a small
You might have a set of properties that is used on the developer machine,
This might seem obvious but I've had this error when trying to use LINQ
I have a TabActivity that has three tabs. The fist tab is the problem.
This just might be too easy for all of you, but I am just
Ok, this might be an easy one, but I can't find a solution. I'm
Caveat: I'm working with a backend that I don't have full control over, so
I may be missing something here because I thought this might be really easy

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.