msgraph-sdk-python icon indicating copy to clipboard operation
msgraph-sdk-python copied to clipboard

Long Paths

Open chris-clark-serverless opened this issue 6 months ago • 3 comments

Is your feature request related to a problem? Please describe the problem.

I'm sorry, but I find this error self inflicted by the graph api, and I think there are many valid reasons not to enable long paths.

Could not install packages due to an OSError: [Errno 2] No such file or directory: '{PrettyMuchCDrivePath+User}\venv\\Lib\\site-packages\\msgraph\\generated\\communications\\call_records\\microsoft_graph_call_records_get_direct_routing_calls_with_from_date_time_with_to_date_time\\get_direct_routing_calls_with_from_date_time_with_to_date_time_get_response.py'
HINT: This error might have occurred since this system does not have Windows Long Path support enabled. You can find information on how to enable this at https://pip.pypa.io/warnings/enable-long-paths

microsoft_graph_call_records_get_direct_routing_calls_with_from_date_time_with_to_date_time\\get_direct_routing_calls_with_from_date_time_with_to_date_time_get_response.py

There is absolutely no reason for a file and folder to be over 170+ characters.

Describe the solution you'd like.

This is most likely caused by some auto generation tool. I'm not sure of the work required, but please keep files and folder lengths below 100 character total. I noticed in this instance the folder path, and the file contain much of the same words in order. This could be mitigated by sharing the "logic of what is happening in the python file" between the file and folder.

Additional context?

No response

chris-clark-serverless avatar Jun 06 '25 14:06 chris-clark-serverless

I'm having the same issue trying to install the latest version. What is the official way to install the latest version of this SDK?

$ pip install git+https://github.com/microsoftgraph/msgraph-sdk-python.git

Collecting git+https://github.com/microsoftgraph/msgraph-sdk-python.git

  Cloning https://github.com/microsoftgraph/msgraph-sdk-python.git to c:\users\USERNAME\appdata\local\temp\1\pip-req-build-lq_xnvcr

  Running command git clone --filter=blob:none --quiet https://github.com/microsoftgraph/msgraph-sdk-python.git 'C:\Users\USERNAME\AppData\Local\Temp\1\pip-req-build-lq_xnvcr'

  error: unable to create file msgraph/generated/communications/call_records/microsoft_graph_call_records_get_direct_routing_calls_with_from_date_time_with_to_date_time/get_direct_routing_calls_with_from_date_time_with_to_date_time_get_response.py: Filename too long

…

  error: unable to create file msgraph/generated/groups/item/team/primary_channel/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name/does_user_have_accessuser_id_user_id_tenant_id_tenant_id_user_principal_name_user_principal_name_request_builder.py: Filename too long

  error: unable to create file msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/conditions/applications/include_applications/item/authentication_condition_application_app_item_request_builder.py: Filename too long

  fatal: cannot create directory at 'msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/on_attribute_collection/graph_on_attribute_collection_external_users_self_service_sign_up': Filename too long

  warning: Clone succeeded, but checkout failed.

  You can inspect what was checked out with 'git status'

  and retry with 'git restore --source=HEAD :/'

  error: subprocess-exited-with-error 

  git clone --filter=blob:none --quiet https://github.com/microsoftgraph/msgraph-sdk-python.git 'C:\Users\USERNAME\AppData\Local\Temp\1\pip-req-build-lq_xnvcr' did not run successfully.

  exit code: 128 

  See above for output.

  note: This error originates from a subprocess, and is likely not a problem with pip.

error: subprocess-exited-with-error

git clone --filter=blob:none --quiet https://github.com/microsoftgraph/msgraph-sdk-python.git 'C:\Users\USERNAME\AppData\Local\Temp\1\pip-req-build-lq_xnvcr' did not run successfully.

exit code: 128

See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

kdunn926 avatar Sep 04 '25 17:09 kdunn926

same here

Installing collected packages: msgraph-sdk
ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: 'C:\\Users\\PinJIN\\AppData\\Roaming\\Python\\Python311\\site-packages\\msgraph\\generated\\communications\\call_records\\microsoft_graph_call_records_get_direct_routing_calls_with_from_date_time_with_to_date_time\\get_direct_routing_calls_with_from_date_time_with_to_date_time_get_response.py'
HINT: This error might have occurred since this system does not have Windows Long Path support enabled. You can find information on how to enable this at https://pip.pypa.io/warnings/enable-long-paths

pindge avatar Sep 23 '25 23:09 pindge

They laid off all their staff, they can't even triage issues.

chris-clark-serverless avatar Sep 24 '25 13:09 chris-clark-serverless