RuntimeError: b'no arguments in initialization list'geoseries.to_crs() failed when use geopandas to calculate distanceHow do I check if a list is empty?Finding the index of an item given a list containing it in PythonWhat is the difference between Python's list methods append and extend?How to make a flat list out of list of lists“Least Astonishment” and the Mutable Default ArgumentHow do I concatenate two lists in Python?How to clone or copy a list?How do I list all files of a directory?How to read a file line-by-line into a list?Geopandas to_file() gives an error regarding fiona.drivers(). Is it possible to work around this?

My Friend James

In-universe, why does Doc Brown program the time machine to go to 1955?

Notation: grace note played on the beat with a chord

Are language and thought the same?

What are some countries where you can be imprisoned for reading or owning a Bible?

What is the justification for Dirac's large numbers hypothesis?

What are the map units that WGS84 uses?

Why does 8 bit truecolor use only 2 bits for blue?

Entering the US with dual citizenship but US passport is long expired?

Draw the ☣ (Biohazard Symbol)

Male viewpoint in an erotic novel

First Number to Contain Each Letter

Meaning of "Right Out" in Context

What drugs were used in England during the High Middle Ages?

Why does the seven segment display have decimal point at the right?

Professor refuses to write a recommendation letter to students who haven't written a research paper with him

Sinning and G-d's will, what's wrong with this logic?

How could a planet have one hemisphere way warmer than the other without the planet being tidally locked?

Fantasy Military Arms and Armor: the Dwarven Grand Armory

Project Euler Problem 45

Did the US Climate Reference Network Show No New Warming Since 2005 in the US?

Temporarily simulate being offline programmatically

When should IGNORE_DUP_KEY option be used on an index?

What's the connection between a spoon (匕) and the old age (⺹)? (Kanji: 老)



RuntimeError: b'no arguments in initialization list'


geoseries.to_crs() failed when use geopandas to calculate distanceHow do I check if a list is empty?Finding the index of an item given a list containing it in PythonWhat is the difference between Python's list methods append and extend?How to make a flat list out of list of lists“Least Astonishment” and the Mutable Default ArgumentHow do I concatenate two lists in Python?How to clone or copy a list?How do I list all files of a directory?How to read a file line-by-line into a list?Geopandas to_file() gives an error regarding fiona.drivers(). Is it possible to work around this?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I'm trying to solve my issue in my own but I couldn't, I'm trying to run this code in every format you can imagine and in ArcGIS pro software it's the same I can't find this error message in any other issue. From similar issues, it seems some data files could be missing?



import geopandas as gpd
import json
import numpy as np
from shapely.geometry import LineString, Point, box
import ast
from pyproj import Proj


paths = road_features.SHAPE.map(lambda x: np.array(ast.literal_eval(x)["paths"][0]))
pathLineStrings = paths.map(LineString)
gdf = gpd.GeoDataFrame(road_features,geometry=pathLineStrings)
#gdf.crs = 'init': 'epsg:3857'
gdf.crs = 'init': 'epsg:4326'


gdf = gdf.to_crs('init': 'epsg:4326')


i get this error



RuntimeError: b'no arguments in initialization list'


also i tried it in arcgis pro i got the same



Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:Program FilesArcGISProbinPythonenvsarcgispro-py3Libsite-packagesgeopandasgeodataframe.py", line 443, in to_crs
geom = df.geometry.to_crs(crs=crs, epsg=epsg)
File "C:Program FilesArcGISProbinPythonenvsarcgispro-py3Libsite-packagesgeopandasgeoseries.py", line 304, in to_crs
proj_in = pyproj.Proj(self.crs, preserve_units=True)
File "C:Program FilesArcGISProbinPythonenvsarcgispro-py3Libsite-packagespyproj__init__.py", line 362, in __new__
return _proj.Proj.__new__(self, projstring)
File "_proj.pyx", line 129, in _proj.Proj.__cinit__


RuntimeError: b'no arguments in initialization list'









share|improve this question



















  • 1





    I ran into an error on an Anaconda, Windows 10 installation in which the pyproj package's file datadir.py was pointing to the wrong location for the proj file epsg. (.../Anaconda3shareproj instead of ...Anaconda3Libraryshare). Editing datadir.py fixed the issue for me.

    – Stephen McAteer
    Aug 16 at 0:21











  • Interestingly, if I launch either JupyterLab or Jupyter Notebook from Anaconda Navigator or Anaconda Prompt, rather than from an Anaconda Powershell Prompt, I get no errors! Shouldn't these all be the same? Why is Anaconda Powershell Prompt messing up?

    – Chad
    Aug 29 at 18:54

















0















I'm trying to solve my issue in my own but I couldn't, I'm trying to run this code in every format you can imagine and in ArcGIS pro software it's the same I can't find this error message in any other issue. From similar issues, it seems some data files could be missing?



import geopandas as gpd
import json
import numpy as np
from shapely.geometry import LineString, Point, box
import ast
from pyproj import Proj


paths = road_features.SHAPE.map(lambda x: np.array(ast.literal_eval(x)["paths"][0]))
pathLineStrings = paths.map(LineString)
gdf = gpd.GeoDataFrame(road_features,geometry=pathLineStrings)
#gdf.crs = 'init': 'epsg:3857'
gdf.crs = 'init': 'epsg:4326'


gdf = gdf.to_crs('init': 'epsg:4326')


i get this error



RuntimeError: b'no arguments in initialization list'


also i tried it in arcgis pro i got the same



Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:Program FilesArcGISProbinPythonenvsarcgispro-py3Libsite-packagesgeopandasgeodataframe.py", line 443, in to_crs
geom = df.geometry.to_crs(crs=crs, epsg=epsg)
File "C:Program FilesArcGISProbinPythonenvsarcgispro-py3Libsite-packagesgeopandasgeoseries.py", line 304, in to_crs
proj_in = pyproj.Proj(self.crs, preserve_units=True)
File "C:Program FilesArcGISProbinPythonenvsarcgispro-py3Libsite-packagespyproj__init__.py", line 362, in __new__
return _proj.Proj.__new__(self, projstring)
File "_proj.pyx", line 129, in _proj.Proj.__cinit__


RuntimeError: b'no arguments in initialization list'









share|improve this question



















  • 1





    I ran into an error on an Anaconda, Windows 10 installation in which the pyproj package's file datadir.py was pointing to the wrong location for the proj file epsg. (.../Anaconda3shareproj instead of ...Anaconda3Libraryshare). Editing datadir.py fixed the issue for me.

    – Stephen McAteer
    Aug 16 at 0:21











  • Interestingly, if I launch either JupyterLab or Jupyter Notebook from Anaconda Navigator or Anaconda Prompt, rather than from an Anaconda Powershell Prompt, I get no errors! Shouldn't these all be the same? Why is Anaconda Powershell Prompt messing up?

    – Chad
    Aug 29 at 18:54













0












0








0


0






I'm trying to solve my issue in my own but I couldn't, I'm trying to run this code in every format you can imagine and in ArcGIS pro software it's the same I can't find this error message in any other issue. From similar issues, it seems some data files could be missing?



import geopandas as gpd
import json
import numpy as np
from shapely.geometry import LineString, Point, box
import ast
from pyproj import Proj


paths = road_features.SHAPE.map(lambda x: np.array(ast.literal_eval(x)["paths"][0]))
pathLineStrings = paths.map(LineString)
gdf = gpd.GeoDataFrame(road_features,geometry=pathLineStrings)
#gdf.crs = 'init': 'epsg:3857'
gdf.crs = 'init': 'epsg:4326'


gdf = gdf.to_crs('init': 'epsg:4326')


i get this error



RuntimeError: b'no arguments in initialization list'


also i tried it in arcgis pro i got the same



Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:Program FilesArcGISProbinPythonenvsarcgispro-py3Libsite-packagesgeopandasgeodataframe.py", line 443, in to_crs
geom = df.geometry.to_crs(crs=crs, epsg=epsg)
File "C:Program FilesArcGISProbinPythonenvsarcgispro-py3Libsite-packagesgeopandasgeoseries.py", line 304, in to_crs
proj_in = pyproj.Proj(self.crs, preserve_units=True)
File "C:Program FilesArcGISProbinPythonenvsarcgispro-py3Libsite-packagespyproj__init__.py", line 362, in __new__
return _proj.Proj.__new__(self, projstring)
File "_proj.pyx", line 129, in _proj.Proj.__cinit__


RuntimeError: b'no arguments in initialization list'









share|improve this question














I'm trying to solve my issue in my own but I couldn't, I'm trying to run this code in every format you can imagine and in ArcGIS pro software it's the same I can't find this error message in any other issue. From similar issues, it seems some data files could be missing?



import geopandas as gpd
import json
import numpy as np
from shapely.geometry import LineString, Point, box
import ast
from pyproj import Proj


paths = road_features.SHAPE.map(lambda x: np.array(ast.literal_eval(x)["paths"][0]))
pathLineStrings = paths.map(LineString)
gdf = gpd.GeoDataFrame(road_features,geometry=pathLineStrings)
#gdf.crs = 'init': 'epsg:3857'
gdf.crs = 'init': 'epsg:4326'


gdf = gdf.to_crs('init': 'epsg:4326')


i get this error



RuntimeError: b'no arguments in initialization list'


also i tried it in arcgis pro i got the same



Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:Program FilesArcGISProbinPythonenvsarcgispro-py3Libsite-packagesgeopandasgeodataframe.py", line 443, in to_crs
geom = df.geometry.to_crs(crs=crs, epsg=epsg)
File "C:Program FilesArcGISProbinPythonenvsarcgispro-py3Libsite-packagesgeopandasgeoseries.py", line 304, in to_crs
proj_in = pyproj.Proj(self.crs, preserve_units=True)
File "C:Program FilesArcGISProbinPythonenvsarcgispro-py3Libsite-packagespyproj__init__.py", line 362, in __new__
return _proj.Proj.__new__(self, projstring)
File "_proj.pyx", line 129, in _proj.Proj.__cinit__


RuntimeError: b'no arguments in initialization list'






python machine-learning arcpy geopandas pyproj






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 28 at 5:02









Maram MubarakMaram Mubarak

181 silver badge7 bronze badges




181 silver badge7 bronze badges










  • 1





    I ran into an error on an Anaconda, Windows 10 installation in which the pyproj package's file datadir.py was pointing to the wrong location for the proj file epsg. (.../Anaconda3shareproj instead of ...Anaconda3Libraryshare). Editing datadir.py fixed the issue for me.

    – Stephen McAteer
    Aug 16 at 0:21











  • Interestingly, if I launch either JupyterLab or Jupyter Notebook from Anaconda Navigator or Anaconda Prompt, rather than from an Anaconda Powershell Prompt, I get no errors! Shouldn't these all be the same? Why is Anaconda Powershell Prompt messing up?

    – Chad
    Aug 29 at 18:54












  • 1





    I ran into an error on an Anaconda, Windows 10 installation in which the pyproj package's file datadir.py was pointing to the wrong location for the proj file epsg. (.../Anaconda3shareproj instead of ...Anaconda3Libraryshare). Editing datadir.py fixed the issue for me.

    – Stephen McAteer
    Aug 16 at 0:21











  • Interestingly, if I launch either JupyterLab or Jupyter Notebook from Anaconda Navigator or Anaconda Prompt, rather than from an Anaconda Powershell Prompt, I get no errors! Shouldn't these all be the same? Why is Anaconda Powershell Prompt messing up?

    – Chad
    Aug 29 at 18:54







1




1





I ran into an error on an Anaconda, Windows 10 installation in which the pyproj package's file datadir.py was pointing to the wrong location for the proj file epsg. (.../Anaconda3shareproj instead of ...Anaconda3Libraryshare). Editing datadir.py fixed the issue for me.

– Stephen McAteer
Aug 16 at 0:21





I ran into an error on an Anaconda, Windows 10 installation in which the pyproj package's file datadir.py was pointing to the wrong location for the proj file epsg. (.../Anaconda3shareproj instead of ...Anaconda3Libraryshare). Editing datadir.py fixed the issue for me.

– Stephen McAteer
Aug 16 at 0:21













Interestingly, if I launch either JupyterLab or Jupyter Notebook from Anaconda Navigator or Anaconda Prompt, rather than from an Anaconda Powershell Prompt, I get no errors! Shouldn't these all be the same? Why is Anaconda Powershell Prompt messing up?

– Chad
Aug 29 at 18:54





Interestingly, if I launch either JupyterLab or Jupyter Notebook from Anaconda Navigator or Anaconda Prompt, rather than from an Anaconda Powershell Prompt, I get no errors! Shouldn't these all be the same? Why is Anaconda Powershell Prompt messing up?

– Chad
Aug 29 at 18:54












2 Answers
2






active

oldest

votes


















0
















Is there an initial crs defined?
I ran into the same problem only when I passed only the epsg command: gdf.to_crs('epsg:4326').



As you show



my_geoseries.crs = 'init' :'epsg:3857'



should be the first step and then transforming to



gdf = gdf.to_crs('init': 'epsg:4326')



If you are working in ArcGIS you could also check in the properties whether the initial epsg is defined ?



great that was the answer thank you






share|improve this answer


































    2
















    to make sure this is pyproj error rather than geopandas.



    import pyproj
    pyproj.Proj("+init=epsg:4326")


    if above runtime error is the same, we can be sure this error is due to pyproj.



    just conda remove pyproj and install it with pip.



    pip install pyproj



    at least this works for me.



    Today(July 30), i resintalled from miniconda, conda remove pyproj did not work for me, instead i pip uninstall pyproj and pip install pyproj makes everything fine.






    share|improve this answer



























    • Thank you! Removing by conda, then pip install pyproj. It works for me.

      – Xiaojian Chen
      Jun 20 at 12:16













    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );














    draft saved

    draft discarded
















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55390492%2fruntimeerror-bno-arguments-in-initialization-list%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0
















    Is there an initial crs defined?
    I ran into the same problem only when I passed only the epsg command: gdf.to_crs('epsg:4326').



    As you show



    my_geoseries.crs = 'init' :'epsg:3857'



    should be the first step and then transforming to



    gdf = gdf.to_crs('init': 'epsg:4326')



    If you are working in ArcGIS you could also check in the properties whether the initial epsg is defined ?



    great that was the answer thank you






    share|improve this answer































      0
















      Is there an initial crs defined?
      I ran into the same problem only when I passed only the epsg command: gdf.to_crs('epsg:4326').



      As you show



      my_geoseries.crs = 'init' :'epsg:3857'



      should be the first step and then transforming to



      gdf = gdf.to_crs('init': 'epsg:4326')



      If you are working in ArcGIS you could also check in the properties whether the initial epsg is defined ?



      great that was the answer thank you






      share|improve this answer





























        0














        0










        0









        Is there an initial crs defined?
        I ran into the same problem only when I passed only the epsg command: gdf.to_crs('epsg:4326').



        As you show



        my_geoseries.crs = 'init' :'epsg:3857'



        should be the first step and then transforming to



        gdf = gdf.to_crs('init': 'epsg:4326')



        If you are working in ArcGIS you could also check in the properties whether the initial epsg is defined ?



        great that was the answer thank you






        share|improve this answer















        Is there an initial crs defined?
        I ran into the same problem only when I passed only the epsg command: gdf.to_crs('epsg:4326').



        As you show



        my_geoseries.crs = 'init' :'epsg:3857'



        should be the first step and then transforming to



        gdf = gdf.to_crs('init': 'epsg:4326')



        If you are working in ArcGIS you could also check in the properties whether the initial epsg is defined ?



        great that was the answer thank you







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Apr 3 at 8:03









        Maram Mubarak

        181 silver badge7 bronze badges




        181 silver badge7 bronze badges










        answered Mar 28 at 9:20









        TrishTrish

        161 bronze badge




        161 bronze badge


























            2
















            to make sure this is pyproj error rather than geopandas.



            import pyproj
            pyproj.Proj("+init=epsg:4326")


            if above runtime error is the same, we can be sure this error is due to pyproj.



            just conda remove pyproj and install it with pip.



            pip install pyproj



            at least this works for me.



            Today(July 30), i resintalled from miniconda, conda remove pyproj did not work for me, instead i pip uninstall pyproj and pip install pyproj makes everything fine.






            share|improve this answer



























            • Thank you! Removing by conda, then pip install pyproj. It works for me.

              – Xiaojian Chen
              Jun 20 at 12:16















            2
















            to make sure this is pyproj error rather than geopandas.



            import pyproj
            pyproj.Proj("+init=epsg:4326")


            if above runtime error is the same, we can be sure this error is due to pyproj.



            just conda remove pyproj and install it with pip.



            pip install pyproj



            at least this works for me.



            Today(July 30), i resintalled from miniconda, conda remove pyproj did not work for me, instead i pip uninstall pyproj and pip install pyproj makes everything fine.






            share|improve this answer



























            • Thank you! Removing by conda, then pip install pyproj. It works for me.

              – Xiaojian Chen
              Jun 20 at 12:16













            2














            2










            2









            to make sure this is pyproj error rather than geopandas.



            import pyproj
            pyproj.Proj("+init=epsg:4326")


            if above runtime error is the same, we can be sure this error is due to pyproj.



            just conda remove pyproj and install it with pip.



            pip install pyproj



            at least this works for me.



            Today(July 30), i resintalled from miniconda, conda remove pyproj did not work for me, instead i pip uninstall pyproj and pip install pyproj makes everything fine.






            share|improve this answer















            to make sure this is pyproj error rather than geopandas.



            import pyproj
            pyproj.Proj("+init=epsg:4326")


            if above runtime error is the same, we can be sure this error is due to pyproj.



            just conda remove pyproj and install it with pip.



            pip install pyproj



            at least this works for me.



            Today(July 30), i resintalled from miniconda, conda remove pyproj did not work for me, instead i pip uninstall pyproj and pip install pyproj makes everything fine.







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Jul 30 at 14:26

























            answered May 19 at 12:53









            Stone ShiStone Shi

            214 bronze badges




            214 bronze badges















            • Thank you! Removing by conda, then pip install pyproj. It works for me.

              – Xiaojian Chen
              Jun 20 at 12:16

















            • Thank you! Removing by conda, then pip install pyproj. It works for me.

              – Xiaojian Chen
              Jun 20 at 12:16
















            Thank you! Removing by conda, then pip install pyproj. It works for me.

            – Xiaojian Chen
            Jun 20 at 12:16





            Thank you! Removing by conda, then pip install pyproj. It works for me.

            – Xiaojian Chen
            Jun 20 at 12:16


















            draft saved

            draft discarded















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55390492%2fruntimeerror-bno-arguments-in-initialization-list%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

            SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

            은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현